Is it possible to ask an autofilter what is current filtered criteriais?

C

Chrisso

Hi All

Is it possible to ask an autofilter what is current filtered criteria
is?

That is if a sheet is being filtered on column A for "foo" can I ask
the autofilter to return "foo"?

I want to ensure that I do not reapply a filter if it is already being
filtered.

Cheers for any thoughts,
Chrisso
 
C

Chrisso

Looked at Help!:

Sub Get_Filter_Criteria()
' the criteria I am interested in is in the 2nd column:
With ThisWorkbook.Sheets("Courses").AutoFilter.Filters(2)
Debug.Print Right(.Criteria1, Len(.Criteria1) - 1)
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top