Vlookup but names are written in an order different from the reference data

taro123

New Member
Joined
Oct 13, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am trying to retrieve data from column B (See table A) but the name list (See table B) that I got is different from the reference list.

The data below are all hypothetical:

Table A
Jenny Elizabeth Mary$10,000
James Tan Jun Kiat$5,000
Mohammed Iskandar Bin Syahrul Ahmad$15,000
Eileen Lim$2,000
Jacky How Ling Ling$1,000

Table B
Elizabeth Mary Jenny
Tan Jun Kiat James
Iskandar Bin Syahrul Ahmad
Lim, Eileen
How Ling Ling, Jacky

I want to return the second column in Table A ($dollars) to the names in table B, but Vlookup does not work due to the names being written in a different order. Would appreciate any help, thanks!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi there and welcome to the forum...

Maybe Xlookup will work?

UPDATE: Tried... not working... anyone else with another suggestion?
 
Upvote 0
ABCD
1Jenny Elizabeth Mary$10,000Elizabeth Jenny Mary
2James Tan Jun Kiat$5,000James Jun Kiat Tan
3Mohammed Iskandar Bin Syahrul Ahmad$15,000Ahmad Bin Iskandar Mohammed Syahrul
4Eileen Lim$2,000Eileen Lim
5Jacky How Ling Ling$1,000How Jacky Ling Ling
6
7Elizabeth Mary JennyElizabeth Jenny Mary$10,000
8Tan Jun Kiat JamesJames Jun Kiat Tan$5,000
9Iskandar Bin Syahrul AhmadAhmad Bin Iskandar Syahrul$15,000
10Lim, EileenEileen Lim,$2,000
11How Ling Ling, JackyHow Jacky Ling Ling,$1,000
FG
Cell Formulas
RangeFormula
C1:C5,C7:C11C1=TEXTJOIN(" ",TRUE,SORT(FILTERXML("<A><B>"&SUBSTITUTE(A1," ","</B><B>")&"</B></A>","//B")))
D7:D11D7=XLOOKUP(C7,$C$1:$C$5,$B$1:$B$5,"",-1)
 
Upvote 0
Solution
Only thing is had to account for comma "," and "Mohammed" in vlookup by using (-1 next smallest), don't know if this will cause you any issues based on the data supplied
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Vlookup but names are written in an order different from the reference data
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,894
Messages
6,122,124
Members
449,066
Latest member
Andyg666

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