LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Range created using Union...accessing cells

In trying to use the ranges created from Union, I can't refer to the cells
properly.

For example, R1=Union(myrange1, myrange2)

If I try the following it works fine:

Dim c as range
For each c in R1.Cells
msgbox c.Address
Next

If I try the following the second iteration when I=2 gives me the address of
the row in the worksheet right below R1.Cells(1,1). It doesn't give me the
address of the second row, fist column cell of R1:

Dim I As long
For I = 1 to R1.Cells.Count
msgbox R1.Cells(I, 1).Address
Next I



 
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
Accessing a macro created named range John Excel Programming 7 February 5th 09 04:12 PM
union range Atishoo Excel Programming 5 June 4th 08 03:02 PM
union range Curt Excel Discussion (Misc queries) 9 April 20th 07 02:32 PM
Ordering of bars in VBA charts created with ChartWizard and union() CAI Excel Programming 4 January 18th 07 10:06 AM
Union/Range/Cells KentÄ[_3_] Excel Programming 2 March 11th 05 11:14 AM


All times are GMT +1. The time now is 06:57 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"