![]() |
macro to select data paste/print
Ok,
Sorry to those who have posted a reply to me before, but now I and my basic VB programming methods are very confused, I have a workbook containing several sheets. Sheet 1 contains rows of data, which are frequently added to. (the first row of data starts on A8:L8, the next added data would be A9:L9 and so on€¦.) What I wish to do is have a macro button which will SELECT THE LAST ROW OF DATA ENTERED ON SHEET 1 and paste this info onto another sheet in the same format This selected pasted data will then be printed off. After new rows of data have been added to sheet 1, I would want the macro to select the very last row of data entered again and paste/print etc etc Can anybody provide the basic VB code for this, as I cant get it to work (as easy as it may seem) Many many thanks Anthony |
Let's say sheet "One" is the sheet with the data you want copied. Sheet
"Two" is the sheet to which you want it pasted. Sub CopyIt() With Sheets("Two") Range("A" & Rows.Count).End(xlUp).Resize(,12).Copy .Range("A" & Rows.Count).End(xlUp).Offset(1) End With End Sub Note that there is a space after the word "Copy". HTH Otto "Anthony" wrote in message ... Ok, Sorry to those who have posted a reply to me before, but now I and my basic VB programming methods are very confused, I have a workbook containing several sheets. Sheet 1 contains rows of data, which are frequently added to. (the first row of data starts on A8:L8, the next added data would be A9:L9 and so on..) What I wish to do is have a macro button which will SELECT THE LAST ROW OF DATA ENTERED ON SHEET 1 and paste this info onto another sheet in the same format This selected pasted data will then be printed off. After new rows of data have been added to sheet 1, I would want the macro to select the very last row of data entered again and paste/print etc etc Can anybody provide the basic VB code for this, as I can't get it to work (as easy as it may seem) Many many thanks Anthony |
All times are GMT +1. The time now is 11:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com