data filter

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Data Filter

Data Filter

resolvedResolved · Low Priority · Version 2007

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

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Do a fast scroll

In big Excel databases with many records, you can move down thousands of rows super-fast as follows: hold down Shift then click on the scrollbar somewhere below the scrollbar handle. This will move you way down the sheet without your having to use the scrollbar up/down arrows or drag on the scrollbar handle.

View all Excel hints and tips


Server loaded in 0.08 secs.