Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
finding the last row for a macro
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help finding saved Macro | Excel Discussion (Misc queries) | |||
Help for Macro: Finding last cell and selecting it | Excel Discussion (Misc queries) | |||
Problem with file finding macro | Excel Programming | |||
can anyone help with copy-finding macro? | Excel Programming | |||
finding last line in macro | Excel Programming |