INDEX Function

limo2088

Board Regular
Joined
Feb 10, 2006
Messages
53
Office Version
  1. 2019
Can anything be done with the fact that the names dont match exactly? So I have a formula which compares Column B with Column A, But as you can see some of the names dont exacly match. They have a middle name or a middle initial. Is there any way to circumvent this? Maybe just use the last name as a verifier.

Cell Formulas
RangeFormula
B3:B22B3='Manual Morning Schedule'!B3
C3C3=IFERROR(INDEX(B:B,AGGREGATE(15,6,ROW(B$3:B$50)/ISNA(MATCH(B$3:B$50,A$3:A$50,0)),ROWS(C$3:C3))),"")
C4:C22C4=IFERROR(INDEX(B:B,AGGREGATE(15,6,ROW(B$3:B$26)/ISNA(MATCH(B$3:B$26,A$3:A$23,0)),ROWS(C$3:C4))),"")
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
List of missing names:
Book2
ABC
2DA Logged Into Mentor DA Working TodayMissing In Mentor
3Dylan StewartBenjamin B KratkyDAsia Clodeen Moore
4Lee DonnellyBrandon Brian BrownleeKelvonne Aisha King
5Jonathon HonakerCassidy Lynn KaurichLauren Calloway
6Quinton ClemonsColton Cyclle Starcher 
7Colton StarcherDAsia Clodeen Moore 
8Anita RussellJayda Marche Nix 
9Anita RussellJeffrey Carl Othberg 
10Benjamin KratkyJessie Muheisien 
11Marlesha BerryJohnathan Terry McRae 
12Jessie MuheisienJonathon Andrew Honaker 
13Cassidy KaurichKelvonne Aisha King 
14Brandon BrownleeLaShae Cherie Johnson 
15Ronald KnightLauren Calloway 
16Lawrence LambertLawrence Phillip Lambert 
17Jervon AustinMarlesha Berry 
18Andrew PickettQuinton Demoine Clemons 
19Johnathan MCRAERonald Michael Knight 
20Lashae Johnson 
21Jayda Nix 
22Jeffrey Othberg 
Sheet1
Cell Formulas
RangeFormula
C3:C22C3=IFERROR(INDEX($B:$B,AGGREGATE(15,6,ROW($B$3:$B$19)/(COUNTIF($A$3:$A$22,LEFT($B$3:$B$19,SEARCH(" ",$B$3:$B$19))&TRIM(RIGHT(SUBSTITUTE($B$3:$B$19," ",REPT(" ",100)),100)))=0),ROW(1:1))),"")
 
Upvote 0
Solution
You could try comparing the first and last names of both columns, i.e.
First names of Column B
Last names of Column B
compare with
First names of Column C
Last names of Column C

also compare them by swapping first/last names.

Assuming the name is in cell C4:
To get the first names, you can use:
=+MID(C4,1,+FIND(" ", C4, 1)-1)
To get the last names, you can use:
=+RIGHT(C4, +LEN(C4)-+FIND("@", +SUBSTITUTE(C4, " ", "@", +LEN(C4)-LEN(SUBSTITUTE(C4," ",""))),1))
 
Upvote 0
List of missing names:
Book2
ABC
2DA Logged Into Mentor DA Working TodayMissing In Mentor
3Dylan StewartBenjamin B KratkyDAsia Clodeen Moore
4Lee DonnellyBrandon Brian BrownleeKelvonne Aisha King
5Jonathon HonakerCassidy Lynn KaurichLauren Calloway
6Quinton ClemonsColton Cyclle Starcher 
7Colton StarcherDAsia Clodeen Moore 
8Anita RussellJayda Marche Nix 
9Anita RussellJeffrey Carl Othberg 
10Benjamin KratkyJessie Muheisien 
11Marlesha BerryJohnathan Terry McRae 
12Jessie MuheisienJonathon Andrew Honaker 
13Cassidy KaurichKelvonne Aisha King 
14Brandon BrownleeLaShae Cherie Johnson 
15Ronald KnightLauren Calloway 
16Lawrence LambertLawrence Phillip Lambert 
17Jervon AustinMarlesha Berry 
18Andrew PickettQuinton Demoine Clemons 
19Johnathan MCRAERonald Michael Knight 
20Lashae Johnson 
21Jayda Nix 
22Jeffrey Othberg 
Sheet1
Cell Formulas
RangeFormula
C3:C22C3=IFERROR(INDEX($B:$B,AGGREGATE(15,6,ROW($B$3:$B$19)/(COUNTIF($A$3:$A$22,LEFT($B$3:$B$19,SEARCH(" ",$B$3:$B$19))&TRIM(RIGHT(SUBSTITUTE($B$3:$B$19," ",REPT(" ",100)),100)))=0),ROW(1:1))),"")
Fantastic, Thank you
 
Upvote 0
You could try comparing the first and last names of both columns, i.e.
First names of Column B
Last names of Column B
compare with
First names of Column C
Last names of Column C

also compare them by swapping first/last names.

Assuming the name is in cell C4:
To get the first names, you can use:
=+MID(C4,1,+FIND(" ", C4, 1)-1)
To get the last names, you can use:
=+RIGHT(C4, +LEN(C4)-+FIND("@", +SUBSTITUTE(C4, " ", "@", +LEN(C4)-LEN(SUBSTITUTE(C4," ",""))),1))
I would have to always sort so its in alpabetical order correct? Because these don't always come in alphabetical order.
 
Upvote 0

Forum statistics

Threads
1,214,621
Messages
6,120,563
Members
448,972
Latest member
Shantanu2024

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