How to Index Ranges?

G

Gap

Hello,

Is there a way I can create an index on a collection of Range Objects
in a Worksheet?

None of the properties in the Range Object are fixed (address, value,
even ID, etc), they all change with one or the other events.

A linear search is the only way I could think of by using address to
search.

Regds
Gap
 
C

Cindy M -WordMVP-

Hi Gap,
Is there a way I can create an index on a collection of Range Objects
in a Worksheet?
Have you considered assigning names to the ranges?
None of the properties in the Range Object are fixed (address, value,
even ID, etc), they all change with one or the other events.

A linear search is the only way I could think of by using address to
search.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
G

Gap

Hi Cindy,

Yes thats what I finally did. Assigned names and made
range.Name.Visible = false. Seems to be the most reliable way till now.


Multiple names are allowed and users can always provide their own
names, so I need to be careful by choosing the first character(s) that
will be lowest in alphabetic order. Looks like range.Name will return
the first name in alphabetic order.

Is there a way to get all the names assigned to a range without going
through the application.Names

Tks & Regds
Gap
 
C

Cindy M -WordMVP-

Hi Gap,
Is there a way to get all the names assigned to a range without going
through the application.Names
You'd need to ask this of an Excel person (excel.programming group
would be the best bet). I a "Wordie" with a very basic knowledge of
Excel, and this particular bit of wisdom isn't part of my repertoire
:)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top