Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
find last row and copy previous row data
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. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
function to find and copy data | Excel Worksheet Functions | |||
Find first previous cell with data | New Users to Excel | |||
Copy old Data from web query while keeping previous days data | Excel Worksheet Functions | |||
cant find 5% more than previous sheet | Excel Discussion (Misc queries) | |||
find previous row for an item | Excel Worksheet Functions |