Hello!
I'm hoping one of you can come to my rescue again 
I have a data table of printers that have different attributes, each with subtypes (color/mono; Media - A3/A4; Type - Printer/MFD/MFP; etc.). I want the user to be able to specify subtypes for up to seven different attributes, and have the code filter the data according to which devices meet all seven criteria.
So far I have no troubles getting it to filter correctly as long as all seven attributes are speficied. However, I want the user to be able to specify as few attributes as they want, and still see results. Perhaps they might want to see all Color MFDs, and they don't care about print speed or media size.
This is where I run into trouble. Is there any way to get autofilter to assume that a criteria left blank is one that should NOT be filtered out?
I've tried the following variations:
'Tried this first
Range("B15").AutoFilter field:=1, Criteria1:=ColorChoice
'Tried this second
Range("B15").AutoFilter field:=1, Criteria1:=ColorChoice, Operator:=xlOr, Criteria2:="="
'Tried this last
Range("B15").AutoFilter field:=1, Criteria1:=ColorChoice, Operator:=xlOr, Criteria2:=""""
None of them work. If I leave a criteria blank, the filter returns no results.
Can anyone tell me what I'm doing wrong?
Thanks so much!
RA
Bookmarks