What is the syntax to clear a filter but leave drop-down icons?

Sheets("<sheet name>").ShowAllData
'examples
Sheets("RevenueSummary").ShowAllData
ActiveSheet.ShowAllData

For another version of clear filter that does remove the filter drop-down icons, click here.

Advertisements

What is the syntax to clear an autofilter?

Sheets("<sheet name>").Range("<chart cell>").AutoFilter
'where chart cell is the right-most, top-most cell containing filtered data
'clears the filter dropdown icons as well
'example
Sheets("RevenueSummary").Range("A1").AutoFilter

For another version of clear filter that doesn’t remove the filter drop-down icons, click here.