Solved

Combine Ranges

Posted on 2010-11-19
4
328 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
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

Expert Comment

by:teylyn
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now