Copy-Paste ever changing ranges

S

Sandy

On Sheet 2 I have ranges in column C, column E and column G all of different
lengths and all changing in size as data is added, but all starting in row
3.

What I would like to do is to copy the range from Sheet 2, column C to
column A in Sheet 3 starting at cell A2, then directly below, paste a copy
of the range from sheet2, column E, and then directly below paste a copy of
the range from sheet 2, column G. Make sense?

I am thinking code on a button would be apt? any thoughts.

Sandy
 
Z

Zone

By ranges, I assume you mean named ranges. If so, copy this code and paste
it into a standard module. Insert a button on the sheet from the Forms
toolbar. Assign the button to this macro. Hope this helps! James

Sub CopyEm()
Dim PutRow As Long
Worksheets(3).Columns(1).ClearContents
Worksheets(2).Activate
Range("Name1").Copy Worksheets(3).Range("A3")
PutRow = 3 + Range("Name1").Cells.Count
Range("Name2").Copy Worksheets(3).Range("A" & PutRow)
PutRow = PutRow + Range("Name2").Cells.Count
Range("Name3").Copy Worksheets(3).Range("A" & PutRow)
Worksheets(3).Activate
End Sub
 
S

Sandy

The ranges weren't named but I was able to work around your coding method.

Thank you
Sandy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top