Lookup and match names in a database

runeyjam

Board Regular
Joined
Feb 10, 2003
Messages
75
I have a spreadsheet where I am trying to match a person's last name and first name, and then record their corresponding title from a database. I want to match their names, which are in separate columns b/c we have several people with the same last names. I used an array formula and everything worked fine. However, I do not want to use an array formula, because other people are going to be updating this information, and they will have no idea how to work with arrays.

The formula I am now using only works some of the time. Here is an example of my spreadsheet.
Conversion to Hourly Wagesv1.xls
ABCD
1LastNameFirstNameJOBTitle
2AbrahamBasmattie#N/A
3AbramsonRichardRichard
4AdelsonRobin#N/A
5AdlersteinAlan#N/A
6Alexander-DraytonGeorgetteLeadCorporateAgent
7AnzaloneAntoinetteK.#REF!
Sheet1


Here is my database:
Conversion to Hourly Wagesv1.xls
ABCD
11LastNameFirstNameJOBTITLEDESCR
12AbramsonRichardCorporateAgent
13Alexander-DraytonGeorgetteLeadCorporateAgent
14AnzaloneAntoinetteK.Support
15AuldSandraW.GetThereAdministrator
16AyresJohnDavidCorporateAgent
Sheet1
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Book4
ABCD
1LastNameFirstNameJOBTitle
2AbrahamBasmattie#N/A
3AbramsonRichardCorporateAgent
4AdelsonRobin#N/A
5AdlersteinAlan#N/A
6Alexander-DraytonGeorgetteLeadCorporateAgent
7AnzaloneAntoinetteK.Support
8
9
10
11LastNameFirstNameJOBTITLEDESCR
12AbramsonRichardCorporateAgent
13Alexander-DraytonGeorgetteLeadCorporateAgent
14AnzaloneAntoinetteK.Support
15AuldSandraW.GetThereAdministrator
16AyresJohnDavidCorporateAgent
Sheet1


The formula in C2 is...

=INDEX($C$12:$C$16,MATCH(1,INDEX(($A$12:$A$16=A2)*($B$12:$B$16=B2),0,1),0))

Note that this is an expensive formula. For an alternative approach, search this site for multi-key lookup where concatenation is used.
 
Upvote 0
Try using a Named Range for your array and include entire columns so that you can account for additions. This way, even with additions, the array will be accurate and all you have to do is copy the formula down on the lookup side.
 
Upvote 0

Forum statistics

Threads
1,221,709
Messages
6,161,432
Members
451,705
Latest member
Priti_190

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