Solved

Combine Ranges

Posted on 2010-11-19
4
333 Views
Last Modified: 2012-08-14
I'm trying to combine two named ranges in VB.  MyRange1 and MyRange2 as MyRange.

I think i need something like: Union(MyRange1, MyRange2)
0
Comment
Question by:mgmee
[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
4 Comments
 
LVL 24

Accepted Solution

by:
broomee9 earned 63 total points
ID: 34174070
Try this:

Set myRange = Application.Union(Range("MyRange1"), Range("MyRange2"))
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 62 total points
ID: 34174073
Yup
Set MyRange = Union([MyRange1], [MyRange2])
0
 
LVL 50
ID: 34608828
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0

Featured Post

Independent Software Vendors: 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

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
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…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

734 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