Microsoft Office Tutorials and References
In Depth Information
Figure 19-28. Selecting unique values
Figure 19-28. Selecting unique values
We will develop a small utility (and add it to the SRXUtils application) that can make a selection
based on some simple criteria. You may want to enhance this utility by adding more criteria.
The first step is to augment the DataSheet for SRXUtils by adding a new row for the new utility,
as shown in Figure 19-29 . (The order of the rows in this DataSheet is based on the order in which
we want the items to appear in the custom menu.)
Figure 19-29. Augmenting the DataSheet worksheet
19.6.1 Designing the Utility
To keep our utility relatively simple, we will implement the following selection criteria:
Select cell if preceding cell is different
Select cell if preceding cell is the same
Select empty cells
Select nonempty cells
The search range for the selection operation, that is, the area to which the selection criteria will be
applied, is the current selection on the active worksheet. Note that we will need to verify that this
is a selection of worksheet cells and not, say, a chart. For the first two criteria, this range must be
either a single row or a single column or a portion thereof. For the last two criteria, the search
range can be any selection of cells.
As a courtesy to the user, if the current selection is just a single cell, the utility will default to the
used range for the last two criteria (empty or nonempty) and to the used portion of the column
containing the active cell for the first two criteria (same and different).
 
 
Search JabSto ::




Custom Search