Solved

Combine Ranges

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

Expert Comment

by:Ingeborg Hawighorst
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

Industry Leaders: 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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

761 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