Find last name with just knowing the first name

Ezguy4u

Active Member
Joined
Feb 10, 2010
Messages
366
Office Version
  1. 365
Platform
  1. Windows
The problem is you know the first name but forgot the last name. So, you type the first name type the first name in C6 and some function will look at the list of names and the output is a single name or few people with the same first name. I would like to use functions from 365


Arnold Question.xlsx
ABCD
1Name
2Paul Wells
3Gary Miller
4James Willard
5Paul GarzaType first nameoutput
6Richard ElliotPaulPaul Wells
7Robert SpearPaul Garza
8Roger MunPaul Hill
9Paul Hill
Data
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try:

Book1
ABCD
1Name
2Paul Wells
3Gary Miller
4James Willard
5Paul GarzaType first nameoutput
6Richard ElliotPaulPaul Wells
7Robert SpearPaul Garza
8Roger MunPaul Hill
9Paul Hill
Sheet5
Cell Formulas
RangeFormula
D6:D8D6=FILTER(A2:A9,LEFT(A2:A9,LEN(C6))=C6)
Dynamic array formulas.


Note that this would also return "Pauline Smith". Name matching is actually quite tricky with different spellings, spaces, punctuation, etc. But this should give you a basic list. Let us know how it works.
 
Upvote 0
Solution
As @Eric W has indicated, the formula could be problematic for Paul/Pauline and would be more so if the fist name was "Jo" as you could also have "Joe", "Joseph", "Josephine", "Jolene", "John", "Jock", "Joyce" etc.
A simple adjustment to Eric's formula should resolve that. Eric's formula in col D, new formula in col E

24 03 17.xlsm
ABCDE
1Name
2Paul Wells
3Gary Miller
4James Willard
5Paul GarzaType first nameoutputoutput
6Richard ElliotPaulPaul WellsPaul Wells
7Pauline SpearPaul GarzaPaul Garza
8Roger MunPauline SpearPaul Hill
9Paul HillPaul Hill
10
Filter Names
Cell Formulas
RangeFormula
D6:D9D6=FILTER(A2:A9,LEFT(A2:A9,LEN(C6))=C6)
E6:E8E6=FILTER(A2:A9,LEFT(A2:A9,LEN(C6)+1)=C6&" ")
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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