Help on adding 3rd filter criteria existing VBA

ItalianPlatinum

Well-known Member
Joined
Mar 23, 2017
Messages
793
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello - I require a minor improvement to add a 3rd filter in my existing VBA. Is someone able to help?

VBA Code:
With Range("10:10")
    .AutoFilter
    .AutoFilter Field:=10, Criteria1:="F", Operator:=xlOr, Criteria2:="A"
    .AutoFilter Field:=11, Criteria1:=""
    .AutoFilter Field:=3, Criteria1:="<>" & Range("D5").Value2
    .AutoFilter Field:=18, Criteria1:="TRUE"
End With

For Field 10 i need to add a 3rd for the letter "C"
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
would this do what you need

Excel Formula:
With range("10:10")
    .AutoFilter
    .AutoFilter Field:=10, Criteria1:=Array("F", "A", "C"), Operator:=xlFilterValues
    .AutoFilter Field:=11, Criteria1:=""
    .AutoFilter Field:=3, Criteria1:="<>" & range("D5").Value2
    .AutoFilter Field:=18, Criteria1:="TRUE"
end with
 
Upvote 0
Solution
would this do what you need

Excel Formula:
With range("10:10")
    .AutoFilter
    .AutoFilter Field:=10, Criteria1:=Array("F", "A", "C"), Operator:=xlFilterValues
    .AutoFilter Field:=11, Criteria1:=""
    .AutoFilter Field:=3, Criteria1:="<>" & range("D5").Value2
    .AutoFilter Field:=18, Criteria1:="TRUE"
end with
Thank you!
 
Upvote 0

Forum statistics

Threads
1,215,651
Messages
6,126,027
Members
449,281
Latest member
redwine77

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