ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Operation on Ranges (https://www.excelbanter.com/excel-programming/275887-re-operation-ranges.html)

JohnI

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





Didier Poskin

Operation on Ranges
 
ThX John

I'll try tomorrow,


Did


---
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




All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com