Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel,microsoft.public.excel.programming
|
|||
|
|||
Range name applies to list, or simply range; collection-index/member-ofprecedence
I must be doing something different from what you have in mind. When
I do Insert-Name-Define, I see the named ranges, including the names that I'm not sure whether they are attached to fixed ranges, or list ranges). When I click F5, I also see those names. Furthermore, I did some tests in VBA., where "TheName" is the name which I'm not sure refers to a List or a fixed Range. Works: nRows = _ Sheets("SheetName").ListObjects(1).ListRows.Count Works: nRows = _ Sheets("SheetName").Range("TheName").Rows.Count Doesn't Work: nRows = _ Sheets("SheetName").ListObjects("TheName").ListRow s.Count The fact that "TheName" isn't accepted as an index to collection ListObjects implies (doesn't prove) that "TheName" is associated with fixed Range rather than a list. However, when I add/remove rows to/ from the list in Excel, the range associated with "TheName" updates accordingly. Would you have any insight that can help make sense of this? I also was wondering about operator precedence. It seems that the member-of function (the dot/period) has the same precedence as the collection indexing function (brackets following a collection name, enclosing either a numerical or string index). These seem to be evaluated from left to right. Is this correct? Finally, where is it documented what arguments accepted within the indexing brackets for a ListObjects collection? In C++/STL, there would be constructors for this, but this is a different environment that I am still trying to get the subtleties of. Thanks! On May 12, 10:16*am, "Don Guillett" wrote: If it is a defined name you will not see it in the list. So, insertnamedefine now you will see the list for all (if not hidden by vba) wrote: I can see the selection if type in the name (or even just click on the name in the list). *That selects the range. *It still doesn't indicate whether the name is attached to a fixed boundary range, or a dynamic boundary list. On May 12, 8:17 am, "Don Guillett" wrote: f5gototype in the name to see the selection wrote: In Excel 2003, if I go through the pull-down menus to define a range name, I can see the bounding spreadsheet coordinates for the various named ranges. (Don't have access to the machine with Excel at the moment, so sorry if this is a bit vague, but I think the menu traversals might be something like Insert-Name-Define). Is there a way to determine whether the names apply to a simple range, or a list? Currently, my way of testing that is to insert rows into a list and see whether the range coordinates for the list name changes. There must be a more direct way than to muss around with my list. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
criteria applies to a range of dates. | Excel Discussion (Misc queries) | |||
Referring to a member of the workbooks collection by name. | Excel Programming | |||
Condensing a list/range with blank cells to a new list/range without blanks | Excel Worksheet Functions | |||
Range collection | Excel Programming | |||
Cell is a Member of a range or Not | Excel Programming |