I am trying to copy the last row of entered data from the range B7:O34 and paste it into the range A7:O7.
When I run this macro I would like it to overwrite the data in A7:O7 and not continue listing the data in consecutive rows.
This is what I have tried:
Sub CopyLastRow()
Dim lRw As Long
With ActiveSheet
lRw = Cells.Find("", .Range("A" & Rows.Count), , , xlByRows, xlPrevious).Row
.Rows(lRw).Copy
End With
With Sheets("Sheet1")
lRw = Cells.Find("", .Range("A" & Rows.Count), , , xlByRows, xlPrevious).Row
.Rows(lRw + 1).PasteSpecial Paste:=xlPasteValues
End With
End Sub