INDEX / MATCH with wildcard (XL2007)

AOB

Well-known Member
Joined
Dec 15, 2010
Messages
660
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Hi guys,

I've read online that it is possible to use wildcard characters within INDEX / MATCH array formulas but I'm having no luck implementing such a formula?

I have a sheet of data and need to locate information in a named range ("rngLookup") based on 4 criteria - one of which is a 'partial' match of text. So in one column (column B), I have some pipe-delimited 'options' and I need the formula to detect a match if the keyword is present within the cell's text, enclosed by the pipe character.

This is the formula I'm using :

Code:
{=IFERROR(INDEX(rngLookup,
  MATCH(1,
    (OFFSET(rngLookup,0,0,,1)="Alan")*
    [COLOR=#ff0000](OFFSET(rngLookup,0,1,,1)="*|DEFG|*")*[/COLOR]
    (OFFSET(rngLookup,0,2,,1)="123")*
    (OFFSET(rngLookup,0,4,,1)="X")
  ,0),4),
"")}

This is the line in the named range that should match based on the above example (and return the "Y" in column D)

A
B
C
D
E
F
1
Alan
|ABCD|DEFG|
123
Y
X
98.76

<tbody>
</tbody>

The second array (highlighted in red) is returning all FALSE values; I was hoping the wildcards before and after in the string could be used to detect the required text within the cell?

Can anybody advise what I'm doing wrong? (The other 3 criteria are working fine...)

Thanks

AOB
 
Cheers Steve - that's exactly what I'm doing - but the result returned is a zero-length string ("")

(See separate thread here - don't want to get pinged for cross-posting!!)

Even though, if I Debug.Print the value of the strFormula string variable and paste it into a cell in the sheet, it calculates correctly / as expected?
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,216,782
Messages
6,132,676
Members
449,747
Latest member
OldMrsMol

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