Referencing Filter Criteria

prcrstntr

New Member
Joined
Nov 15, 2003
Messages
28
I am trying to figure out how to reference individual column filter criteria in an IF/Then statement. I was able to use AutoFilter.Filters(CF).Criteria1 where CF is a variable for the column. Using this method, though, if column A has a criteria selected, then column B shows up as having a criteria too, because only certain rows are being selected, based on the criteria in column A. If I hold the cursor over the Filter Icon at the top of column A, it says, "Number:" and "Equals"3"" (the column name and the value that the column is being filtered by). If I hold the cursor over the Filter Icon at the top of column B, it says, "Color:" and "(Showing All)" (the column name and the fact that no criteria was selected). If anybody can provide me a way to reference the "(Showing All)" comment in my If/Then statement, I believe I can accomplish my goal.
 
Last edited:

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Thanks for sharing the link, sijpie. I will look into it further for future reference. Last night I was able to solve my problem by using, "IF AutoFilter.Filters(CF).Criteria1 = Empty Then", where Empty represents the "(Showing All)" comment or nothing selected for the filter in that column, it gives me a reliable result.

Not what I was specifically asking for, but it does meet my needs.

I consider my issue solved, unless somebody has an interest in pursuing it.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top