Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not sure this is a totally satisfactory explanation, but here's my
best guess. Look at ? Range("B2:B5").Cells.Count, Range("B2:B5").Columns(1).Count 4 1 When you reference the column property, it returns a unit rather than a range of cells. Since the rng(1, 1) syntax is shorthand for rng.item(rowindex, columnindex) syntax, my best guess is that specifying a rowindex is ambiguous and therefore returns the error. In article , "Tim Zych" wrote: 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Arange sorted data in multiple columns | Excel Discussion (Misc queries) | |||
Help to adapt Formula syntax to work with Visible Filtered Cells | Excel Worksheet Functions | |||
Help to adapt Formula syntax to work with Dynamic Named Ranges | Excel Worksheet Functions | |||
arange dates | Excel Discussion (Misc queries) | |||
rng(1,1) syntax doesn't work for set rng = arange.columns(1) | Excel Programming |