Disregard argument in FILTER function

ajocius1

Board Regular
Joined
Dec 21, 2007
Messages
111
Office Version
  1. 365
Platform
  1. Windows
I am using FILTER function, where I define array and use multiple criteria that I want to use as filter for my result. Let say I use Country, Company and Year criteria to filter my data. Criteria is read from another cell where I have dropdown field with all possible values. It all works fine if I select for example Sweden, Volvo and 2021.

I would like to be disregard one of the three criteria's that I am using. So for example if I want to see Sweden, Volvo and then to see values for all years, what do I do. I know I can change formula to just use two criteria's instead of three, however I am looking for potential easier solution. I would like to enter something like % or * in the year criteria field to give me ALL values (in other words disregard that criteria).

Anyway to accomplish that?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Disregard argument in FILTER function
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Try like this
Excel Formula:
=FILTER(RangeToFilter,CountryRange=CountryOfInterest)*(CompanyRange=CompanyOfInterest)*(IF(YearOfInterest="*",1,YearRange=YearOfInterest)))
 
Last edited:
Upvote 0
Yes, thought about IF statement to get it done, but was hopping that there is some symbol or symbol combo to tell excel to filter "nothing" (leave all values). One can use * or % in SQL query for example. Even though IF solution works, I have quite many FILTER formulas with 3-5 Filters, so was looking for possible shortcut here.
 
Upvote 0
The FILTER function does not have a direct wildcard facility as you seem to be seeking. Here is another possible work-around approach that may be of use in some limited circumstances.

BTW, I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

22 02 01.xlsm
ABCDEFGHIJK
1CountryCompanyYearCountryCompanyYearCountryCompanyYear
2ah2023***ah2023
3bg2022bg2022
4ch2023ch2023
5dg2022dg2022
6ch2023ch2023
7bg2023bg2023
8dh2022dh2022
9ag2022ag2022
10ah2020ah2020
11cg2023cg2023
12dh2020dh2020
13bg2020bg2020
14ch2022ch2022
15bg2022bg2022
16ch2020ch2020
17cg2021cg2021
18ch2022ch2022
FILTER
Cell Formulas
RangeFormula
I2:K18I2=FILTER(A2:C18,(SEARCH(E2&"|",A2:A18&"|"&E2&"|")=1)*(SEARCH(F2&"|",B2:B18&"|"&F2&"|")=1)*(SEARCH(G2&"|",C2:C18&"|"&G2&"|")=1))
Dynamic array formulas.
 
Upvote 0
@ajocius1 maybe you missed what Peter said here

This is also posted here Disregard argument in FILTER function amongst other sites.
Please supply links to all other sites where you have asked this question. Thanks
This question has been also posted on:
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,871
Members
449,054
Latest member
juliecooper255

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