I am trying to copy range A6:L, down to the last row from Sheet "Step 1". Then paste onto Sheet "Vendor_Copy", but pasting on the first empty row after A19.
Here is what I have, which does everything but paste in the correct place. It's pasting starting in A1, which is a blank cell. However, even if I fill all rows from 1 - 19 with the number 1, it still pastes in A1 on sheet "Vendor_Copy".
Thank you for your help!
Dim sht1 As Worksheet
Dim sht2 As Worksheet
Dim lr As Long
Set sht1 = Worksheets("Step 1")
Set sht2 = Worksheets("Vendor_Copy")
lr = sht2.Range("A19").End(xlDown).Row
sht1.Activate
Range("A6").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
sht2.Activate
Cells(lastrow + 1, 1).PasteSpecial
sht2.Cells(Rows.Count, "A").End(xlUp).Offset(1,0).PasteSpecial
– Tim WilliamsxlDown
to find the last row. You may want to see THIS Similarly avoid the use ofxlToRight
to find last column. – Siddharth Rout