ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating ranges (https://www.excelbanter.com/excel-programming/363063-creating-ranges.html)

pmguerra[_8_]

Creating ranges
 

Hi

Can anyone tell me how do I create a range based on other two ranges
It's kind of concatenating ranges...

eg.:

set myrange_1= range("A1")

set myrange_2= range("B1")

Now I want a range that is based on these two...


Thanks for your help

--
pmguerr
-----------------------------------------------------------------------
pmguerra's Profile: http://www.excelforum.com/member.php...fo&userid=1498
View this thread: http://www.excelforum.com/showthread.php?threadid=54764


Paul Lautman

Creating ranges
 
pmguerra wrote:
Hi

Can anyone tell me how do I create a range based on other two ranges?
It's kind of concatenating ranges...

eg.:

set myrange_1= range("A1")

set myrange_2= range("B1")

Now I want a range that is based on these two...


Thanks for your help!


Do you mean:

set myrange_3 = Application.union(myrange_1,myrange_2)



Stefano Gatto

Creating ranges
 
Look at the Union Method in the Excel's VBA help.
--
Stefano Gatto


"pmguerra" wrote:


Hi

Can anyone tell me how do I create a range based on other two ranges?
It's kind of concatenating ranges...

eg.:

set myrange_1= range("A1")

set myrange_2= range("B1")

Now I want a range that is based on these two...


Thanks for your help!


--
pmguerra
------------------------------------------------------------------------
pmguerra's Profile: http://www.excelforum.com/member.php...o&userid=14986
View this thread: http://www.excelforum.com/showthread...hreadid=547642



pmguerra[_9_]

Creating ranges
 

Thanks!!!

It's exactly what I was looking for!!

--
pmguerr
-----------------------------------------------------------------------
pmguerra's Profile: http://www.excelforum.com/member.php...fo&userid=1498
View this thread: http://www.excelforum.com/showthread.php?threadid=54764



All times are GMT +1. The time now is 11:05 AM.

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