Match to a list with wildcards

The Gent

Board Regular
Joined
Jul 23, 2019
Messages
50
Good day all,

I am trying to do something which it my head feels quite simple but I can't get a result.

I have four dimensions in a spreadsheet report, lets say: make; model; fuel; engine.

Separately i have a list of exclusions which is a series of the four dimensions that I want to strip out of the report when analysing the report.

My exclusions list is also four dimensions but I want to be able to use wildcards to exclude certain combinations of the report.

The plan is to have a match function in the original report and use a flag to highlight those rows which match the criteria on the exclusions list. In the example below, on the exclusions list I want to exclude any row which has six as the engine, therefore I have used wildcards on the exclusions list for all other dimensions. This doesn't seem to work though.

Any ideas?


For example:

ReportExclusion
MakeModelFuelEngineExclude?MakeModelFuelEngine
FordFiestaPetrolFour***Six
FordMondeoDieselFour
ToyotaYarisPetrolTwo
JaguarFPetrolSixX
VolkswagonPoloDieselFour
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Note - this is the formula I tried to use on the report - =IFNA(IF(MATCH(D2249&"."&F2249&"."&AO2249&"."&AT2249,EXCLUSIONS!$N:$N,0),"X"),"")

EXCLUSIONS!$N:$N being the concatenation of the four fields.
 
Upvote 0
I think it would be much simpler to use 4 MATCH functions and just leave the non-excluded columns blank.
 
Upvote 0
Hello,

I hope my reading of your problem is correct. This seems to work?
Test Date grouping in pivot without saving cache.xlsx
ABCDEFGHIJKLMNOP
1ReportExclusion
2MakeModelFuelEngineExclude?MakeModelFuelEngineExcludeString
3FordFiestaPetrolFourFALSESixSix
4FordMondeoDieselFourFALSEPoloDieselPolo Diesel
5ToyotaYarisPetrolTwoFALSEFordFiestaDieselFourFord Fiesta Diesel Four
6JaguarFPetrolSixTRUE 
7VolkswagonPoloDieselFourTRUE
8FordFiestaDieselFourTRUE
9
10
Sheet3
Cell Formulas
RangeFormula
N3:N5,O6N3=TEXTJOIN(" ",TRUE,J3:M3)
F3:F8F3=ISNUMBER(AGGREGATE(15,6,ROW($N$3:$N$5)/SEARCH($N$3:$N$5,TEXTJOIN(" ",TRUE,B3:E3)),1))
 
Upvote 0
Try this:

=IF(SUM(IF($J$3:$M$3="",1,--(B3:E3=$J$3:$M$3)))=4,"X","")

Enter with Ctrl+Shift+Enter.
 
Upvote 0
Or try:

=IF(SUMPRODUCT((B3:E3=$J$3:$M$3)+($J$3:$M$3=""))=4,"X","")
 
Upvote 0
Hello,

I hope my reading of your problem is correct. This seems to work?
Test Date grouping in pivot without saving cache.xlsx
ABCDEFGHIJKLMNOP
1ReportExclusion
2MakeModelFuelEngineExclude?MakeModelFuelEngineExcludeString
3FordFiestaPetrolFourFALSESixSix
4FordMondeoDieselFourFALSEPoloDieselPolo Diesel
5ToyotaYarisPetrolTwoFALSEFordFiestaDieselFourFord Fiesta Diesel Four
6JaguarFPetrolSixTRUE 
7VolkswagonPoloDieselFourTRUE
8FordFiestaDieselFourTRUE
9
10
Sheet3
Cell Formulas
RangeFormula
N3:N5,O6N3=TEXTJOIN(" ",TRUE,J3:M3)
F3:F8F3=ISNUMBER(AGGREGATE(15,6,ROW($N$3:$N$5)/SEARCH($N$3:$N$5,TEXTJOIN(" ",TRUE,B3:E3)),1))

Hi,

Thanks for the suggestion. I think this is going to burnout my file though, I should have mentioned I have ~40k rows of data in each report and so it doesn't seem to be able to cope with this.
 
Upvote 0
Try this:

=IF(SUM(IF($J$3:$M$3="",1,--(B3:E3=$J$3:$M$3)))=4,"X","")

Enter with Ctrl+Shift+Enter.
This only seems to look at one row but then doesn't return the desired result when I expand to multiple rows i.e. $J$3:$M$5.
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,007
Members
448,935
Latest member
ijat

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