Index Match not matching

Dugzilla

New Member
Joined
Oct 11, 2023
Messages
22
Office Version
  1. 2021
Platform
  1. MacOS
2 tabels:

Table A, column B has partial names:

Column B
D. Miller
M. Smith
H. Jones

Table B, column B has the list of names I am indexing:

Derelect Miller
Peter Gonads
Mike Smith
Bill Bomba
Hairy Jones
Jimmy Nutball

This is my formula in Table A, C1... using a wildcard:

(From Table A)
=INDEX('TableB!'!$B$1:$B$6,MATCH("*"&B1,$B$1:$B$33,0))

The formula returns all names of Table B just as you would find in the array B1:B6 above.

I tried XLOOKUP for my first time, but it returns a #value error. I suppose because I read where the arrays must be the same size? (XLOOKUP works great when the arrays are equal size.)

I've been working on this for over an hour but can't figure out what is wrong with the formula.

Thank you for any help.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I tried XLOOKUP for my first time, but it returns a #value error
XLOOKUP can be a good option for you in current scenario... Use Wildcard as option in search type.

If it still gives error share the formula you are using... Would try to help... Working on formula with non present data :unsure:
 
Upvote 0
XLOOKUP can be a good option for you in current scenario... Use Wildcard as option in search type.

To get XLOOKUP to work, I have to ensure the arrays are the same number of rows. (The first array is only 325 rows, the second array is 943 rows.) If I make the first array 943 rows (B3:B943 for example) to match the second array, the #VALUE is gone. However, it still returns exactly as the INDEX MATCh formula above.
 
Upvote 0
Maybe something like this:

Book1
ABCDE
1List 1List 2List 1 in List 2
2D. MillerDerelect MillerDerelect Miller
3M. SmithPeter GonadsMike Smith
4H. JonesMike SmithHairy Jones
5Bill Bomba
6Hairy Jones
7Jimmy Nutball
Sheet2
Cell Formulas
RangeFormula
E2:E4E2=IFERROR(INDEX($C$2:$C$7,MATCH(TEXTAFTER(A2," "),TEXTAFTER($C$2:$C$7," "),0)),"")
 
Upvote 0
Solution
You're welcome. Thanks for the feedback. There could be an issue if more than 1 customer has the last name. If there were 2 Smith then it will only find the first one.
 
Upvote 0
You are correct. I will have to work out the formula filtering a criteria called position. Thank you again.
 
Upvote 0
If your version of Excel has the FILTER function. Try

Book1
ABCDE
1List 1List 2List 1 in List 2
2D. MillerDerelect MillerDerelect Miller
3M. SmithPeter GonadsMike Smith
4H. JonesMike SmithHairy Smith
5H. SmithBill Bomba
6Hairy Smith
7Jimmy Nutball
Sheet2
Cell Formulas
RangeFormula
E2:E4E2=FILTER($C$2:$C$7,COUNTIF(A2:A5,LEFT(C2:C7,1)&". "&TEXTAFTER($C$2:$C$7," "))>0)
Dynamic array formulas.
 
Upvote 0
If your version of Excel has the FILTER function. Try

Book1
ABCDE
1List 1List 2List 1 in List 2
2D. MillerDerelect MillerDerelect Miller
3M. SmithPeter GonadsMike Smith
4H. JonesMike SmithHairy Smith
5H. SmithBill Bomba
6Hairy Smith
7Jimmy Nutball
Sheet2
Cell Formulas
RangeFormula
E2:E4E2=FILTER($C$2:$C$7,COUNTIF(A2:A5,LEFT(C2:C7,1)&". "&TEXTAFTER($C$2:$C$7," "))>0)
Dynamic array formulas.
Thank you again. I will plug that in and make sure "I" don't make any mistakes!!!
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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