Multi-Criteria Index-Match with Wildcard

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
801
Office Version
  1. 365
Platform
  1. Windows
Hi guys,

I'm using a multi-criteria Index-Match to return a cost-code where two criteria are found in two ranges:

Excel Formula:
{=INDEX(Validation!M:M,MATCH(1,(Validation!L:L="*"&B28&"*")*(Validation!N:N=C28),0))}

So what I want is in Validation column M, I'm looking in Validation Column L for B28 = "Banana" and Validation Column N for C28 = "Donkey"

Column L in Validation has string values such as "Apple_Banana_Coconut"


So I thought if I wrap B28 in wildcards it would find it.

I have confirmed that my formula works if I remove the wildcards and replace the appropriate value in Column L with just "Banana", so it's clearly an issue with multi-criteria index-match not liking wildcards.


Thank you.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Possibly replace
Excel Formula:
Validation!L:L="*"&B28&"*"

with
Excel Formula:
ISNUMBER(SEARCH(B28,L:L,1))

I do not have any data to test it on so I cannot say for sure that it will work.

Hope that helps,

Doug
 
Upvote 0
Try something like this.
Also, it's best not to use whole column references. If your data would never go below say row 10000, then use something like M2:M10000.
If you would only match 1 row then use the formula in D6 of the example. The formula in D2 will work if you have multiply matches. Drag this formula down as needed.

Book2
ABCDEKLMN
1More than 1 matchHeader1ValidationHeader2
2Val3AppleVal1Cat
3Val5Apple_CoconutVal2Dog
4Apple_Coconut_BananaVal3Donkey
5Only 1 matchOrangeVal4Bird
6Val3Grape_Banana_AppleVal5Donkey
27
28Banana
Sheet2
Cell Formulas
RangeFormula
D2:D3D2=IFERROR(INDEX($M$2:$M$6,AGGREGATE(15,6,(ROW($M$2:$M$6)-ROW($M$2)+1)/(ISNUMBER(SEARCH($B$28,$L$2:$L$6))*($N$2:$N$6="Donkey")),ROWS($D$2:D2))),"")
D6D6=INDEX($M$2:$M$6,AGGREGATE(15,6,(ROW($M$2:$M$6)-ROW($M$2)+1)/(ISNUMBER(SEARCH($B$28,$L$2:$L$6))*($N$2:$N$6="Donkey")),1))
 
Upvote 0
Try this

=LOOKUP(1,-SEARCH(B28,Validation!$L$1:$L$10000)/(Validation!$N$1:$N$10000=C28),Validation!$M$1:$M$10000)
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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