View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default find last row and copy previous row data

Try something like the following code. Change the value of the TEST_COLUMN
constant to the column letter that will be used to determine the last row.

Sub RepeatLastRow()
Const TEST_COLUMN = "C"
With ActiveSheet
.Cells(.Rows.Count,
TEST_COLUMN).End(xlUp).EntireRow.Resize(2).FillDow n
End With
End Sub


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



"Woodi2" wrote in message
...
Could anyone help please. I am looking to create a macro that will find
the
last rows data, copy that data then paste it in the row below.
i.e. row 10 is the last row containing data. I want a macro to copy the
data in row 10 and paste it in row 11.
I cant specify the row in the macro as the row numbers will increase each
time the macro is used.
Thanks in advance for any help.