0

Hiya a bit new to this I did find an example like my problem but could not work the solution out. Its a simple task so sorry. I would like the code to paste from my ranged cell down not up.(hmm tried the obvious to me but no good). Here is my code it searches one sheet and pastes the results to another but goes up rather than down. I am sure you have an example somewhere but could not locate it. Many Thanks Steve,I got told off last time because it was presented correctly. Sorry in advance.

For i = 2 To finalrow
        If Cells(i, 1) = Manufacturer And Cells(i, 2) = Model Then 'if the name matches then search and copy
        Range(Cells(i, 1), Cells(i, 19)).Copy ' copy 19 columns -details
        Worksheets("Man_Mod").Select ' go to to specific sheet
         Range("F4").End(xlUp).PasteSpecial xlPasteFormulasAndNumberFormats ' find the first blank row and paste
        Worksheets("Link_Table").Select 'GO BACK TO WRENCH DATA AND CONTINUE SEARCHING
        End If

Next i
BigBen
  • 46,229
  • 7
  • 24
  • 40

1 Answers1

0
  1. First step is to find the last row.
  2. An added improvement is to avoid using Select.
With Worksheets("Link_Table")
    For i = 2 To finalrow
        If .Cells(i, 1).Value = Manufacturer And .Cells(i, 2).Value = Model Then
            .Cells(i, 1).Resize(,19).Copy
            Worksheets("Man_Mod").Range("F" & .Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteFormulasAndNumberFormats
        End If
    Next i
End With
BigBen
  • 46,229
  • 7
  • 24
  • 40