08-19-2005 01:46 PM
08-19-2005 06:45 PM
You don't specify which version of Excel you are using, or what type of data you have. Regardless, I recommend the AutoFilter Method which applies to a Range object. Here are the parameters:
expression.AutoFilter(Field, Criteria1, Operator, Criteria2, VisibleDropDown)
expression Required. An expression that returns one of the objects in the Applies To list.
Field Optional Variant. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field one).
Criteria1 Optional Variant. The criteria (a string; for example, "101"). Use "=" to find blank fields, or use "<>" to find nonblank fields. If this argument is omitted, the criteria is All. If Operator is xlTop10Items, Criteria1 specifies the number of items (for example, "10").