Convert name and surname in to ID

bkobal

New Member
Joined
Feb 23, 2011
Messages
11
Hi

On the left side I have a table with names, surnames and associated ID.

I would like to enter the name (H3) and surname (I3) and the function would return an appropriate ID (J3). See picture.

excel.jpg


Please Help.

Thanks!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Excel Workbook
CDEFGHI
22namesurnameIDnamesurnameID
23BobSmithaaaaaBobBrownddddd
24Alicejohnsonbbbbbbb
25WillWilliamsccccc
26BobBrownddddd
27CateJoneseeeeeee
Sheet1
 
Upvote 0
adding the If and Or onto the front will avoid an error message appearing if you inadvertently place only 1 name in the names box

=IF(OR(G23="",H23=""),"",INDEX(E23:E27,MATCH(G23&H23,INDEX(C23:C27&D23:D27,),0)))
 
Upvote 0
If there in no mach both functions return #N/A.

In that case i would like, that function returns "no mach" for example. How can i do that?
 
Upvote 0
You can modify my suggestion like this

=LOOKUP("zzz",IF({1,0},"No Match",LOOKUP(2,1/(D2:D6=H3)/(E2:E6=I3),F2:F6)))
 
Upvote 0
Doing this from my phone so not able to post a proper formula, if you use excel 2007, use =IFERROR((My Formula Here),"No Match")
 
Upvote 0
Code:
=IFERROR((IF(OR(H3="";I3="");"no data";(LOOKUP(2;1/(D2:D6=H3)/(E2:E6=I3);F2:F6))));"No Match")
This formula works OK for me. Thanks for hellp.
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,767
Members
452,940
Latest member
rootytrip

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