AutoFilter.AddFilter

AutoFilter.AddFilter method

Adds a filter for a filter column.

public void AddFilter(int fieldIndex, string criteria)
ParameterTypeDescription
fieldIndexInt32The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
criteriaStringThe specified criteria (a string; for example, “101”). It only can be null or be one of the cells’ value in this column.

Remarks

MS Excel 2007 supports multiple selection in a filter column.

See Also