View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JohnI JohnI is offline
external usenet poster
 
Posts: 6
Default Operation on Ranges

Didier,


try -

Set rangeA = Union(rangeB, rangeC)

example-

Set rangeA = Union(Range("A2:B3"), Range("D2:E4"))


regards,

JohnI


"Didier Poskin" wrote in message
...
Hi,
I'm kind of new with vba and I would like to know if there is a way two

make
a new range by adding or uniting two other ranges.

with

dim rangeA as range
dim rangeB as range
dim rangeC as range

I've tried
rangeA = rangeB + rangeC

and
rangeA = rangeB & rangeC

without any success.

Will anybody help me


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 1/09/2003