Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 61
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
function to find and copy data Carpe Diem Excel Worksheet Functions 1 August 2nd 07 06:55 PM
Find first previous cell with data Nancy Newburger New Users to Excel 3 August 10th 06 09:10 PM
Copy old Data from web query while keeping previous days data DRobidoux Excel Worksheet Functions 0 March 22nd 06 01:56 PM
cant find 5% more than previous sheet needexcelhelp19 Excel Discussion (Misc queries) 1 March 8th 06 04:39 AM
find previous row for an item HedwigVB Excel Worksheet Functions 2 March 25th 05 04:49 AM


All times are GMT +1. The time now is 02:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"