S
Steve
Hello. I am trying to write code that will do an xlendup on a
worksheet to find the last row, and then offset 9 rows up. After I
have the range, copy the range and insert on the next available line.
I tried some code (below) but couldnt get it to work. Any ideas?
Thanks!
lastrow = ActiveSheet.Cells(Cells.Rows.Count, "D").End(xlUp).Row
lastrange = ActiveSheet.Rows(lastrow.Resize(9, 0))
Rows(lastrange).Copy.
Rows(lastrange).Insert Shift:=xlDown
worksheet to find the last row, and then offset 9 rows up. After I
have the range, copy the range and insert on the next available line.
I tried some code (below) but couldnt get it to work. Any ideas?
Thanks!
lastrow = ActiveSheet.Cells(Cells.Rows.Count, "D").End(xlUp).Row
lastrange = ActiveSheet.Rows(lastrow.Resize(9, 0))
Rows(lastrange).Copy.
Rows(lastrange).Insert Shift:=xlDown