I need to write a simple macro to copy the last row in a spreadsheet and paste it as a new row in the other sheet.
Please help.
Thanx in advance.
I need to write a simple macro to copy the last row in a spreadsheet and paste it as a new row in the other sheet.
Please help.
Thanx in advance.
Last edited by VBA Noob; 03-19-2009 at 05:42 PM.
Please take a few minutes to read the Forum Rules about thread titles, and then edit yours to make it descriptive of your problem.
Entia non sunt multiplicanda sine necessitate
Thank you. Try this:
![]()
Please Login or Register to view this content.
Thanx for responding.
This code does copy from sheet 1 to sheet 2.
But i want to copy the last row as in the latest row from sheet1 and paste it in the sheet 2 as a new row.
Can i call LASTINROW function.
if so how can i incorporate it in the code.
I am new to writing macros.... so need help.
Last edited by swe1; 03-19-2009 at 03:36 PM.
The code copies the row containing the last used cell in Sheet1 column A to the row below the last used cell in Sheet2 column A. If you need something different, please explain clearly.But i want to copy the last row as in the latest row from sheet1 and paste it in the sheet 2 as a new row.
Pardon?Can i call LASTINROW function.
Hi,
Thanks SHG!
Your code works but with an error 1004.
I tried the following code.It seems to be working but still have problems while pasting the row.
Note:I tried working between the sheets in the same workbook.
Please help.Any help would be appreciated.
Thanks!
Here is my code.
![]()
Please Login or Register to view this content.
Last edited by swe1; 03-21-2009 at 08:53 PM.
Please edit your post to add code tags.
Hi Shg,
I did add code Tags.
I don't see what the problem is. Please post a workbook and explain in context.
Hello Shg,
I have attached my workbook.
I get the runtime error 1004
at the following code
Rows(Emptycell.select)
Replace all of your code with this:
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks