D
Dag Johansen
Hi,
how can I reliably and efficiently determine if a cell "is
a member of" a named range, i.e. if it is part of a named
range?
It should work looping trough all Names, determine if the
name refers to a range, and if so loop through the cells
of the range and compare with the "pivot" (the given cell)
using the Is operator. If a match is found, return the
named range (i.e. stop looping immediately); if loop
terminates, return Nothing.
But is there a better way? It seems to me if there are
lots of/huge named ranges in a workbook this method might
be a little slow.
Any ideas?
how can I reliably and efficiently determine if a cell "is
a member of" a named range, i.e. if it is part of a named
range?
It should work looping trough all Names, determine if the
name refers to a range, and if so loop through the cells
of the range and compare with the "pivot" (the given cell)
using the Is operator. If a match is found, return the
named range (i.e. stop looping immediately); if loop
terminates, return Nothing.
But is there a better way? It seems to me if there are
lots of/huge named ranges in a workbook this method might
be a little slow.
Any ideas?