Code to unfilter one field only

G

Guest

Here is my code:

Sheets("CEU Database").Select

If Sheets("Code").Range("L2").Value = "All" Then
'??? I need to unfilter Field: 1 only, and leave all other filtered
fields intact
Else
Cells.Select
Selection.AutoFilter Field:=1,
Criteria1:=Sheets("Code").Range("L2").Value
End If
 
D

Dave Peterson

I put a little data on a worksheet.

I applied data|filter to that data. I filtered by both column 1 and column 2.
Then I turned on the macro recorder when I did "(All)" for the first field. I
got this back:

Selection.AutoFilter Field:=1
 

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

Similar Threads


Top