Link to home
Start Free TrialLog in
Avatar of Jagwarman
Jagwarman

asked on

help on Autofilter

can an Expert help me out with this

I have code that autofilters then does some copying and pasting the first part of the code is

Dim myRange
ActiveSheet.Range("$A:$T").AutoFilter Field:=18, Criteria1:="<=15"

then I need to loop this to autofilter on Field 20 but I realise I can't use

ActiveSheet.Range("$A:$T").AutoFilter Field:=20, Criteria1:="<=15"

as I get Autofilter method of Range class failed.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Phillip Burton
Phillip Burton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jagwarman
Jagwarman

ASKER

That is very bizzare. as you say it works in your spreadsheet but not in mine I will have to investigate further
Maybe post your spreadsheet.

Is there a heading in cell S1 (i.e. is the table continuous)?
Hi Phillip

thanks for the use of your brain. Not sure what it was but by removing the filters completely and then running the code it works.

Have a good Xmas