Using Wildcards in an Index Match Formula

Gollum9

New Member
Joined
Feb 10, 2011
Messages
31
Office Version
  1. 365
Platform
  1. Windows
I have an existing Index Match formula which has been working fine when searching for a single string of text. What I'm trying to do now is to get a wildcard introduced so that if the course is called 'Subject A', it would also select the result if it's 'Subject A - North', 'Subject A - South' etc.

The current formula is (it has {} around it):

=IFERROR(INDEX(Classroom!$Z$3:$Z$9235,MATCH(1,($B214=Classroom!$AB$3:$AB$9235)*("Subject A"=Classroom!$W$3:$W$9235),0)),"")

In place of the "Subject A", I have tried putting Subject A into a cell and then referenced that by using C1&"*" but that didn't work. I've also tried using the text in the formula and going with "Subject A*" but no joy there either.

Just wondering where I'm going wrong and what the best solution might be?

Many thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Maybe...

=IFERROR(INDEX(Classroom!$Z$3:$Z$9235,MATCH(1,($B214=Classroom!$AB$3:$AB$9235)*ISNUMBER(SEARCH(C1,Classroom!$W$3:$W$9235)),0)),"")
Ctrl+Shift+Enter

M.
 
Upvote 0
Thanks very much, this worked great.

The only thing that was a little strange was that it still seemed to work even when the C1 cell was blank??? I have been through and checked it's bringing through the correct result and it is though.

Thanks again
 
Upvote 0
You are welcome. Thanks for the feedback.

About C1 blank:
Try something like
=IF(C1="","", <formula here=""></formula>formula here)

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,124
Messages
6,123,184
Members
449,090
Latest member
bes000

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