1
votes

I am trying to find the last cell of column e.g. A then copy the whole row range which corresponds to that cell e.g. copy A5,B5,C5 etc and paste them to another sheet in specific row range e.g. A10,B10, C10 etc. Any help? thank you very much!

Sub Macro3() 
  Sheets("Stream").Range("D" & Rows.Count).End(xlUp).Copy
  Sheets("General").Range("F2").PasteSpecial Paste:=xlPasteValues,   Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End Sub
1

1 Answers

0
votes
Sub Macro3() 
        Dim LastRowStream As Long, LastRowGeneral As Long,
        LastRowStream = Sheets("Stream").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
        Rows(LastRowStream & ":" & LastRowStream).EntireRow.copy

        LastRowGeneral = Sheets("General").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
        Sheets("General").Range("A" & LastRowGeneral).PasteSpecial Paste:=xlPasteValues,   Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End Sub