Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default rng(1,1) syntax doesn't work for set rng = arange.columns(1)

Hi Tim:

A wild guess, but possibly a single column is internally defined to be
one-dimensional, causing a conflict with the double index.

?Range("B2:X5").Columns(1).Address
$B$2:$B$5
?Range("B2:B5")(1).Address
$B$2

However:

?Range("B2:X5").Columns(1)(1).Address
$B$2:$B$5

It seems that once you define a range explicitly as a column, the unit
becomes the column and not a cell within the column. I'm not expressing the
concept very well, but I'm sure you get the gist.

Regards,

Vasant.

"Tim Zych" wrote in message
...
Anybody know why this doesn't work?

Dim rng As Range
Set rng = Range("B2:X5").Columns(1)
Debug.Print rng.Address '<- this works
Debug.Print rng(1, 1).Address '<-this doesn't

Yes, rng.cells(1,1) does work. What's up with this?

XL2000, Win2000



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
Arange sorted data in multiple columns Unknown Excel Discussion (Misc queries) 6 September 6th 07 03:59 AM
Help to adapt Formula syntax to work with Visible Filtered Cells Sam via OfficeKB.com Excel Worksheet Functions 6 September 16th 05 11:42 PM
Help to adapt Formula syntax to work with Dynamic Named Ranges Sam via OfficeKB.com Excel Worksheet Functions 13 April 29th 05 12:36 AM
rng(1,1) syntax doesn't work for set rng = arange.columns(1) J.E. McGimpsey Excel Programming 2 October 1st 03 12:28 AM
rng(1,1) syntax doesn't work for set rng = arange.columns(1) Alan Beban[_3_] Excel Programming 2 September 30th 03 11:29 PM


All times are GMT +1. The time now is 02:16 PM.

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

About Us

"It's about Microsoft Excel"