Hi all,
I have a worksheet to which I need to apply the same filters to various columns to extract totals. Some of the filters can become quite complex, so I recorded some macros to simplify my life (and reduce keying errors).
An very simple example is shown below.
Sub Macro1()
Selection.AutoFilter Field:=13, Criteria1:="80", Operator:= _
xlBottom10Percent
End Sub
My problem is that I want to be able to use this macro on any column, not just 13. I tried adding activecell.select, but I think I need to replace the Field:=13 with something.
As always, any advice would be greatly appreciated.
Henio
I have a worksheet to which I need to apply the same filters to various columns to extract totals. Some of the filters can become quite complex, so I recorded some macros to simplify my life (and reduce keying errors).
An very simple example is shown below.
Sub Macro1()
Selection.AutoFilter Field:=13, Criteria1:="80", Operator:= _
xlBottom10Percent
End Sub
My problem is that I want to be able to use this macro on any column, not just 13. I tried adding activecell.select, but I think I need to replace the Field:=13 with something.
As always, any advice would be greatly appreciated.
Henio