Code to unfilter one field only

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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

Userform Code 3
VBA Code issue 2
Help me4 2
Selection.AutoFilter Issue 1
Different Results from the Same Macro 2
Activate macro in another book 2
filter 1
removing rows but not based on a range 12

Back
Top