View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ddate ddate is offline
external usenet poster
 
Posts: 10
Default Filter Macro that can work for any column/active cell

I have recorded a macro but unfortunately it only works for one column. I
would like it to apply to any column and be dependent on what is the active
cell. How do i change this code to do that?

I'm not sure what the field = 24 stands for and what I can replace it with
to make it based on the active cell.

Sub Filter0()
Selection.AutoFilter Field:=24, Criteria1:="<0", Operator:=xlAnd
End Sub