Solved

Copy paste an named range with VBA in Excel

Posted on 2011-03-23
3
655 Views
Last Modified: 2012-05-11
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
Comment
Question by:ssmith94015
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 500 total points
ID: 35200545
use something like:

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

Open in new window


Thomas
0
 

Author Closing Comment

by:ssmith94015
ID: 35200760
Thank you - it was so simple
0
 
LVL 39

Expert Comment

by:nutsch
ID: 35200794
Glad to help.

Thomas
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question