Filtering out a more than 2 criteria

frustrated_macro

New Member
Joined
Sep 4, 2019
Messages
49
Office Version
  1. 365
Platform
  1. Windows
I have about 17 reports that i need to filter out a few diff criteria from each
its pretty much one massive report, split into 17 tabs, based on criteria, and then within those tabs i have to filter out certain languages, based on which tab it is from this column
1715089921975.png


so what i had, that i thought was working was this:

ActiveSheet.UsedRange.AutoFilter Field:=11, Criteria1:="Portuguese (Brazilian)"
Application.DisplayAlerts = False
ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisible).Delete
Application.DisplayAlerts = True
ActiveSheet.UsedRange.AutoFilter Field:=11, Criteria1:="Spanish (Undifferentiated)"
Application.DisplayAlerts = False
ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisible).Delete
Application.DisplayAlerts = True


it works okay, but it keeps deleting my first header row, because its grabbing all visible cells



i just tried this, but it gave me nothing at all, it just filtered them out and i was left with a completely empty sheet

ActiveSheet.UsedRange.AutoFilter Field:=11, Criteria1:="Portuguese (Brazilian)", Criteria2:="="



i used to be filtering something else out that no longer shows up on the report like this, and it kept everything else, except these two, so im not sure why the reverse doesnt work
ActiveSheet.UsedRange.AutoFilter Field:=14, Criteria1:="<>Complete", Criteria2:="<>Autocomplete"


i will ALSO need to create a second filter AFTER i get the language to work, to filter out certain TYPES of orders, from column H, in a very similar way


AND if at all possible, i have a specific combination that i need filtered out of EVERY sheet except 3 that is a language and order combination between H and K
Essentially H has Closed Captions, and K will have like English and Spanish and i will only want to filter out the ones that are Closed Captions AND English
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
This is definitely possible with VBA, but why not try out PowerQuery? You could drag and drop the report into a folder, and then click refresh on your report excel, and you would have every tab filled out correctly.
 
Upvote 0
Also, I see that you are using Excel 365. Excel 365 has a new FILTER function that you can use in Formulas.
Check out this link which shows you how to do it for multiple criteria: How To Use Excel FILTER Function With Multiple Criteria

You may even be able to use the VSTACK function to return the matching values from all 17 sheets into one summary sheet. See: VSTACK Function
 
Upvote 0

Forum statistics

Threads
1,224,811
Messages
6,181,082
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