easy solution formula finding first and last name

jordanburch

Active Member
Joined
Jun 10, 2016
Messages
443
Office Version
  1. 2016
Hi All I have the below

=OR(LEFT(E176,LEN(E176)-SEARCH(" ",E176)),LEFT(E176,FIND(",",E176,1)-1)) referencing either the two names I need it to pull out the first and the last name as they can be different. E176 could look like the below. Its giving a value error when I coombine them. Just need to to work on either or the first name no matter how it shows in e176.
CAMPBELL VICTORIA
DAVIS,KRISTIN
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi, here's one way you could try.

Book1
EF
176CAMPBELL VICTORIACAMPBELL
177DAVIS,KRISTINDAVIS
Sheet1
Cell Formulas
RangeFormula
F176:F177F176=LEFT(E176,FIND(",",SUBSTITUTE(E176," ",",")&",")-1)
 
Upvote 0
It's unclear whether the names without the commas are first name last name or last name first name. If the former then you can try:
Book1
ABC
1Full NameFirst nameLast Name
2CAMPBELL VICTORIACAMPBELLVICTORIA
3DAVIS,KRISTINKRISTINDAVIS
Sheet1
Cell Formulas
RangeFormula
B2:B3B2=IFERROR(MID(A2,FIND(",",A2)+1,LEN(A2)),LEFT(A2,FIND(" ",A2)-1))
C2:C3C2=IFERROR(LEFT(A2,FIND(",",A2)-1),MID(A2,FIND(" ",A2)+1,LEN(A2)))
 
Upvote 1
Solution
Hi, here's one way you could try.

Book1
EF
176CAMPBELL VICTORIACAMPBELL
177DAVIS,KRISTINDAVIS
Sheet1
Cell Formulas
RangeFormula
F176:F177F176=LEFT(E176,FIND(",",SUBSTITUTE(E176," ",",")&",")-1)
that worked thanks! Now im trying to do the right which would be the first name

=RIGHT(E176,FIND(",",SUBSTITUTE(E176," ",",")&",")+1)

It comes out correctly on that when I do plus 1 but on otheres in includes part of the last letter of the last name for example

=RIGHT(E175,FIND(",",SUBSTITUTE(E175," ",",")&",")+1)
CAMPBELL VICTORIA

I just want it to say Victoria



=RIGHT(E188,FIND(",",SUBSTITUTE(E188," ",",")&",")+1)

TOWNER,MARIAH

gives me R,Mariah just need Mariah Can you please help with that to bro?
 
Upvote 0
It's unclear whether the names without the commas are first name last name or last name first name. If the former then you can try:
Book1
ABC
1Full NameFirst nameLast Name
2CAMPBELL VICTORIACAMPBELLVICTORIA
3DAVIS,KRISTINKRISTINDAVIS
Sheet1
Cell Formulas
RangeFormula
B2:B3B2=IFERROR(MID(A2,FIND(",",A2)+1,LEN(A2)),LEFT(A2,FIND(" ",A2)-1))
C2:C3C2=IFERROR(LEFT(A2,FIND(",",A2)-1),MID(A2,FIND(" ",A2)+1,LEN(A2)))
wow you are brilliant worked like a charm God bless!
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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