finding the last row for a macro
Sub copyrange()
Sheets("sheet1").Range("CO2") = Sheets("sheet3").Range("CO2")
Sheets("sheet1").Activate
Lastrow = Cells(Rows.Count, 1).End(xlUp).Row
Cells(Lastrow, 1).Copy Destination:=Range("B" & CStr(Lastrow) & ":CN" &
CStr(Lastrow))
End Sub
"Mctabish" wrote:
I want to copy an item from on cell in worksheet3 (CO2) and then paste it in
worksheet1 (CO2) then copy this all the way down to the last row. I would
like to do this in a macro. I have tried recording this several ways, but it
is not reliable.
Also, I would like to go to the bottom row, and fill lastrow,A through
lastrow,colCN with the value of lastrow,A
How would this macro look?
Thanks
Mc
|