VLookup help needed

jc352

Board Regular
Joined
Aug 13, 2008
Messages
139
Office Version
  1. 365
Platform
  1. Windows
I have several names in a list that do not exactly match information on another sheet. How would I go about changing my VLookup to accommodate these differences in the names? I have managed to make it work for most, but have a few that I can't manage to figure out a solution other than manually correcting the names.

Sheet 1


Excel 2010
AB
1Bailey, Kelly R94.36
2Bessert, Nanette R93.11
3Bradley, Susan R92.49
4Campbell, Sharlene R86.16
5Del Real, Paul83.6
6Garcia, Sally R90.91
7Jackson, Sarah H93.14
8Jarvis, Brenda J88.07
9Lindo, Mary M88.52
10Lippert, Jacqueline R92.04
11Lizarraras, Virginia R93
12Marine Dominguez, Deirdre87.86
13McClinton, Bradley W78.88
14Pollard, Pamela R96.13
15Ragland, Letitia R91.07
16Schwenk, Kathy R86.83
17Strellrecht, Lisa92.92
18Sullivan, Kathleen J.93.47
19Vail, Sharleen R95.67
20Wright, Cheryl L80.81
Sheet1


Sheet 2


Excel 2010
AB
1BAILEY, KELLY#N/A
2BESSERT, NANETTE E#N/A
3BRADLEY, SUSAN C#N/A
4CAMPBELL, SHARLENE D#N/A
5DELREAL, PAUL#N/A
6GARCIA, SALLY#N/A
7JACKSON, SARAH M#N/A
8JARVIS, BRENDA, J#N/A
9LINDO, MARIA M#N/A
10LIPPERT, JACQUELINE#N/A
11LIZARRARAS, VIRGINIA#N/A
12MARINE DOMINGUEZ, DEIRDRE, M#N/A
13MCCLINTON, BRADLEY M#N/A
14POLLARD, PAMELA A#N/A
15RAGLAND, LETITIA A#N/A
16SCHWENK, KATHY J#N/A
17STELLRECHT, LISA#N/A
18SULLIVAN, KATHLEEN J#N/A
19VAIL, SHARLEEN C#N/A
20WRIGHT, CHERYL#N/A
Sheet2
Cell Formulas
RangeFormula
B1=IF(ISERROR(VLOOKUP(TRIM(LEFT(A1,FIND("^",SUBSTITUTE(A1," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A1,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A1,FIND("^",SUBSTITUTE(A1," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B2=IF(ISERROR(VLOOKUP(TRIM(LEFT(A2,FIND("^",SUBSTITUTE(A2," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A2,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A2,FIND("^",SUBSTITUTE(A2," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B3=IF(ISERROR(VLOOKUP(TRIM(LEFT(A3,FIND("^",SUBSTITUTE(A3," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A3,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A3,FIND("^",SUBSTITUTE(A3," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B4=IF(ISERROR(VLOOKUP(TRIM(LEFT(A4,FIND("^",SUBSTITUTE(A4," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A4,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A4,FIND("^",SUBSTITUTE(A4," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B5=IF(ISERROR(VLOOKUP(TRIM(LEFT(A5,FIND("^",SUBSTITUTE(A5," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A5,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A5,FIND("^",SUBSTITUTE(A5," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B6=IF(ISERROR(VLOOKUP(TRIM(LEFT(A6,FIND("^",SUBSTITUTE(A6," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A6,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A6,FIND("^",SUBSTITUTE(A6," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B7=IF(ISERROR(VLOOKUP(TRIM(LEFT(A7,FIND("^",SUBSTITUTE(A7," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A7,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A7,FIND("^",SUBSTITUTE(A7," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B8=IF(ISERROR(VLOOKUP(TRIM(LEFT(A8,FIND("^",SUBSTITUTE(A8," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A8,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A8,FIND("^",SUBSTITUTE(A8," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B9=IF(ISERROR(VLOOKUP(TRIM(LEFT(A9,FIND("^",SUBSTITUTE(A9," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A9,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A9,FIND("^",SUBSTITUTE(A9," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B10=IF(ISERROR(VLOOKUP(TRIM(LEFT(A10,FIND("^",SUBSTITUTE(A10," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A10,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A10,FIND("^",SUBSTITUTE(A10," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B11=IF(ISERROR(VLOOKUP(TRIM(LEFT(A11,FIND("^",SUBSTITUTE(A11," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A11,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A11,FIND("^",SUBSTITUTE(A11," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B12=IF(ISERROR(VLOOKUP(TRIM(LEFT(A12,FIND("^",SUBSTITUTE(A12," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A12,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A12,FIND("^",SUBSTITUTE(A12," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B13=IF(ISERROR(VLOOKUP(TRIM(LEFT(A13,FIND("^",SUBSTITUTE(A13," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A13,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A13,FIND("^",SUBSTITUTE(A13," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B14=IF(ISERROR(VLOOKUP(TRIM(LEFT(A14,FIND("^",SUBSTITUTE(A14," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A14,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A14,FIND("^",SUBSTITUTE(A14," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B15=IF(ISERROR(VLOOKUP(TRIM(LEFT(A15,FIND("^",SUBSTITUTE(A15," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A15,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A15,FIND("^",SUBSTITUTE(A15," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B16=IF(ISERROR(VLOOKUP(TRIM(LEFT(A16,FIND("^",SUBSTITUTE(A16," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A16,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A16,FIND("^",SUBSTITUTE(A16," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B17=IF(ISERROR(VLOOKUP(TRIM(LEFT(A17,FIND("^",SUBSTITUTE(A17," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A17,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A17,FIND("^",SUBSTITUTE(A17," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B18=IF(ISERROR(VLOOKUP(TRIM(LEFT(A18,FIND("^",SUBSTITUTE(A18," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A18,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A18,FIND("^",SUBSTITUTE(A18," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B19=IF(ISERROR(VLOOKUP(TRIM(LEFT(A19,FIND("^",SUBSTITUTE(A19," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A19,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A19,FIND("^",SUBSTITUTE(A19," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
B20=IF(ISERROR(VLOOKUP(TRIM(LEFT(A20,FIND("^",SUBSTITUTE(A20," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE)),VLOOKUP(A20,Sheet1!$A$1:$B$20,2,FALSE),VLOOKUP(TRIM(LEFT(A20,FIND("^",SUBSTITUTE(A20," ","^",2),1)-1)),Sheet1!$A$1:$B$20,2,FALSE))
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Thank you, that worked perfectly. I am not all that familiar with using arrays with formulas.
 
Upvote 0

Forum statistics

Threads
1,222,069
Messages
6,163,736
Members
451,854
Latest member
Tiffany Smith

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