Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 679
  • Last Modified:

Copy paste an named range with VBA in Excel

I have a worksheet with one worksheet per client.  However, I need to copy the client named rnages of data into one worksheet called DataSource.  That is, ranges CLIENTONE, CLIENT TWO, CLIENTTHREE, etc. named ranges copied to the DataSource worksheet.  Of course, the code would find the last blank row and copy the next range there, but how to I tell it to simply copy the entire range, not just the range name?
0
ssmith94015
Asked:
ssmith94015
  • 2
1 Solution
 
nutschCommented:
use something like:

range("CLIENTONE").copy sheets("Destination").cells(rows.count,1).end(xlup).offset(1)

Open in new window


Thomas
0
 
ssmith94015Author Commented:
Thank you - it was so simple
0
 
nutschCommented:
Glad to help.

Thomas
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now