View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Macro help required

Hi, adapt the following....
where the filter is set to range A1:A5, the Field number relate to the
column# of the filtered column and the criteria the filter value.
The first use of autofilter turns it on (be careful if it is on, it turns
off!) and, the second filters blanks only, and the last resets the criteria
to ALL.


Sub Filter()
With Range("A1:A5")
.Autofilter
.AutoFilter Field:=1, Criteria1:="="
.AutoFilter Field:=1
End With
End Sub

--
Cheers
Nigel



"Ian Macfarlane" wrote in message
...
I have set up my filters(datafilterauto filter)
Now I want a macro that will do the following:
By invoking the macro it will
1. Show only the blank cells on any given selected col
and by invoking the same macro will display ALL the entries in a selected
col

Would appreciate some help
Thanks