Solved

Copy paste an named range with VBA in Excel

Posted on 2011-03-23
3
643 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

751 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