Drop Down Filter Question

Guzzlr

Well-known Member
Joined
Apr 20, 2009
Messages
946
Office Version
  1. 2016
Platform
  1. Windows
Code:
With Range("A1:D1")[INDENT].AutoFilter[/INDENT]
[INDENT].AutoFilter field:=1, VisibleDropDown:=False
.AutoFilter field:=3, VisibleDropDown:=False[/INDENT]
[INDENT].AutoFilter field:=2, Criteria:="3"
.AutoFilter[/INDENT]
End With

Hello,
I'm having trouble with my drop down filter. It keeps faulting on Criteria:="3". How do I get Field 2 to select the number 3 from the drop down?
Thank you
 
Last edited:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Not to sure on the code but if 3 is the number 3 then it shouldn't be in quotes

tried what you suggested, keep getting a "named argument not found" on Criteria:=3
Thanks
 
Upvote 0
it should be Criteria1:=
 
Upvote 0
Is this a table you are working on or a series of drop downs

Just a series of drop down. in column B, I have numbers of 1 - 22, in column D I have numbers of 23 - 33. column B I want to filter the number 3. thanks
 
Upvote 0
it should be Criteria1:=

Oh...I thought Criteria was the number I was trying to filter for, Are you saying Criteria 1 is Column B, because it is the first filter?
 
Upvote 0
Code:
[COLOR=#333333]it should be Criteria[/COLOR][COLOR=#ff0000]1[/COLOR][COLOR=#333333]:=[/COLOR]

this is working, I understand now, thank you
 
Upvote 0
Are you saying Criteria 1 is Column B, because it is the first filter?
Nope, the field is the column, but you can filter on 2 different criteria.
So you use Criteria1, for the first value to filter on & Criteria2 for the second (if you want to use both).
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,806
Members
449,048
Latest member
greyangel23

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