Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Union Method with multiple worksheets

I can easily form a "union" of ranges on the same worksheet but bwtween range
on two or more sheets. I get a 1004 error anyway I try it.

Any ideas on how to do this?

Set R2 = Worksheets(1).Range("a22:a200")
Set R1 = Worksheets(2).Range("B2:B22")
Set rngUnion = Union(R1, R2)

--
Jeff B
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Union Method with multiple worksheets

Hi Jeff,

I do not believe that a range object can be 3D and, therefore, a union is
consrtained to a single sheet.

---
Regards,
Norman



"Jeff B" wrote in message
...
I can easily form a "union" of ranges on the same worksheet but bwtween
range
on two or more sheets. I get a 1004 error anyway I try it.

Any ideas on how to do this?

Set R2 = Worksheets(1).Range("a22:a200")
Set R1 = Worksheets(2).Range("B2:B22")
Set rngUnion = Union(R1, R2)

--
Jeff B



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Union Method with multiple worksheets

Just to add a thought.
The parent of a range is a worksheet. Since the union returns a range, it
would not be able to have a parent if the union were composed of multiple
sheets.

--
Regards,
Tom Ogilvy


"Norman Jones" wrote in message
...
Hi Jeff,

I do not believe that a range object can be 3D and, therefore, a union is
consrtained to a single sheet.

---
Regards,
Norman



"Jeff B" wrote in message
...
I can easily form a "union" of ranges on the same worksheet but bwtween
range
on two or more sheets. I get a 1004 error anyway I try it.

Any ideas on how to do this?

Set R2 = Worksheets(1).Range("a22:a200")
Set R1 = Worksheets(2).Range("B2:B22")
Set rngUnion = Union(R1, R2)

--
Jeff B





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Union Method with multiple worksheets

Hi Tom,

I prefer your explanation.

---
Regards,
Norman



"Tom Ogilvy" wrote in message
...
Just to add a thought.
The parent of a range is a worksheet. Since the union returns a range, it
would not be able to have a parent if the union were composed of multiple
sheets.

--
Regards,
Tom Ogilvy


"Norman Jones" wrote in message
...
Hi Jeff,

I do not believe that a range object can be 3D and, therefore, a union is
consrtained to a single sheet.

---
Regards,
Norman



"Jeff B" wrote in message
...
I can easily form a "union" of ranges on the same worksheet but bwtween
range
on two or more sheets. I get a 1004 error anyway I try it.

Any ideas on how to do this?

Set R2 = Worksheets(1).Range("a22:a200")
Set R1 = Worksheets(2).Range("B2:B22")
Set rngUnion = Union(R1, R2)

--
Jeff B







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the quickest method to insert & name multiple worksheets . clyonesse Excel Worksheet Functions 8 September 20th 05 10:55 PM
What is the quickest method to insert & name multiple worksheets . clyonesse Excel Worksheet Functions 0 January 20th 05 06:15 PM
union method for non-adjacent ranges Dana DeLouis[_5_] Excel Programming 0 September 16th 03 03:29 PM
union method for non-adjacent ranges Tom Ogilvy Excel Programming 0 September 16th 03 02:21 PM
union method for non-adjacent ranges Jim Rech Excel Programming 0 September 16th 03 02:17 PM


All times are GMT +1. The time now is 04:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"