Izabela has attended:
Excel VBA Intro Intermediate course
Data Filter
Anthony
Thanks for being such a wonderful teacher.
I've got a macro which put a filter in columns but it doesn't filter anything.
I would like the filter to pick all numbers apart 0.
Could you please point me how to do that?
Thanks
RE: Data Filter
Hi Izabela, thanks for your query and the nice words! As for the filter, try this out. I'm going to assume that your macro turns the Autofilter on:
Selection.AutoFilter
I'm then going to filter on Column C (Field 3) and set the criteria so that only records with numbers that are not equal to 0 in that column are pulled out:
ActiveSheet.Range("$A$1:$F$278").AutoFilter Field:=3, Criteria1:="<>0", _
Operator:=xlAnd
That should do the trick! Try apply this to your own data and let me know how you get on.
All the best,
Anthony