![]() |
copy and paste data from different sheets
i have data on sheet 1 in range A1 to C100. I need a macro to copy all the
data starting from the bottom (which in this case is at row 100) going up 73 rows. then paste it on sheet 2 starting at cell A1. Then another macro to select / copy the rest of data from row 72 up from sheet 1, and paste on sheet 2 at cell E1. Depending on my data, the macro needs to select at the very bottom row all the time because the data range can change from C100 as above to C200. No matter what, it would have to copy and paste the bottom 73 rows first. Help would be much appreciated. thanks |
copy and paste data from different sheets
Modify to suit
Sub copybottom72() mc = 2 Set ds = Sheets("sheet11") lr = Cells(Rows.Count, mc).End(xlUp).Row Cells(lr - 4, mc).Resize(4, 0).Copy ds.Cells(1, "d") Cells(1, mc).Resize(lr - 4, 0).Copy ds.Cells(1, "e") End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "johncaleb" wrote in message ... i have data on sheet 1 in range A1 to C100. I need a macro to copy all the data starting from the bottom (which in this case is at row 100) going up 73 rows. then paste it on sheet 2 starting at cell A1. Then another macro to select / copy the rest of data from row 72 up from sheet 1, and paste on sheet 2 at cell E1. Depending on my data, the macro needs to select at the very bottom row all the time because the data range can change from C100 as above to C200. No matter what, it would have to copy and paste the bottom 73 rows first. Help would be much appreciated. thanks |
All times are GMT +1. The time now is 06:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com