ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy/Paste dynamic ranges (https://www.excelbanter.com/excel-programming/429089-copy-paste-dynamic-ranges.html)

Kevin

Copy/Paste dynamic ranges
 
Hi,
I am trying to copy data from 3 tabs onto one tab eg Jan, Feb, Mar onto 2009
one underneath the other on the 2009 tab. I have recored a macro but it
always references a static cell to paste to. how do I get it to find the last
of the already pasted data and paste on the next row ie find the first empty
row as the data to be copied from the monthly tabs will vary in rows.

I hope this makes sense.
I am using the following code:
Selection.End(xlDown).Select
Range("A50").Select ----- this needs to be dynamic
ActiveSheet.Paste

Thanks in advance
Kevin

joel

Copy/Paste dynamic ranges
 
LastRow = Range("A1").End(xlDown).Row
Newrow = Lastrow + 1
Range("A" & NewRow).Paste


"kevin" wrote:

Hi,
I am trying to copy data from 3 tabs onto one tab eg Jan, Feb, Mar onto 2009
one underneath the other on the 2009 tab. I have recored a macro but it
always references a static cell to paste to. how do I get it to find the last
of the already pasted data and paste on the next row ie find the first empty
row as the data to be copied from the monthly tabs will vary in rows.

I hope this makes sense.
I am using the following code:
Selection.End(xlDown).Select
Range("A50").Select ----- this needs to be dynamic
ActiveSheet.Paste

Thanks in advance
Kevin



All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com