AutoFilter Method

See Also         Example         Applies To

Displays or hides the AutoFilter drop-down arrows.

Syntax

expression.AutoFilter

expression   An expression that returns a Range object.

Remarks

Do not confuse this method with the AutoFilter property. This method applies to a Range object and turns on the AutoFilter, whereas the AutoFilter property returns the AutoFilter object for a given worksheet.

You typically use this method to turn on the AutoFilter and add one or more criteria to it; you can then use the Apply method to apply the new filter. For more information, see the example for this topic.