home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
xltools.zip
/
RANGEHLP.TXT
< prev
next >
Wrap
Text File
|
1990-10-18
|
1KB
|
28 lines
RANGE
For Excel Macro Language programmers. Finds the minimum rectangle which
surrounds all the cells containing values. When your macro wishes to
insert a formula into an area of the spreadsheet, RANGE reduces
recalculation time by identifying the smallest area which must be filled.
For example, this is useful in designing cellular games like LIFE, in
which the location and size of each generation changes. RANGE will
identify all active cells, or it can be used to find all cells having a
specified value in a complex population.
RANGE returns the rectangle it finds as text. It also selects the
rectangle on the spreadsheet. This means that after RANGE is called, the
selected area is ready to be manipulated. RANGE returns FALSE if it fails
to find any cells containing values.
RANGE takes two arguments: the definition of the active cell, and whether
to do a positive or negative search.
A negative search finds all cells which do not have values. The definition
of a blank cell need not be that it is empty. For instance, it might be
desirable to flag cells containing 0 as empty. The significance of the
first argument in this case is that it defines the contents of a null cell.
A positive search finds all cells which have a certain value. The first
argument in this case specifies the contents of a full cell.
The code is fully documented and available for unrestricted use.