Quick and easy for the experts...

MaxPeck

New Member
Joined
Feb 23, 2004
Messages
7
Have in column b:

Smith*John

Need to split last and first name into separate cells. Hitch: some of the cells in B have entries like "Bob's Market" . The only cells I want to modify have an asterisk seperating the last and first names.

Thanks for the help, left my Excel book at home, can't find the stinkin thing on PDF on my HDD>

Thanks again list.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

plettieri

Well-known Member
Joined
Sep 4, 2002
Messages
1,556
Platform
  1. MacOS
Hi

You could try DATA | TEXT TO COLUMNS and use the * as the delimiter....

hope this helps

plettieri
 

jcvoth

Board Regular
Joined
Feb 23, 2004
Messages
198
I'd do the following

First name = LEFT(E2,FIND("*",E2,1)-1)
Last name = RIGHT(E2,FIND("*",E2,1)-1)

Where the name John*Paul is in E2.

Good luck!

-Jarrod
 

jcvoth

Board Regular
Joined
Feb 23, 2004
Messages
198
Here is the same formula as before, but with protection from the "Hitch".

First name =IF(ISERROR(FIND("*",E2)),E2,LEFT(E2,FIND("*",E2,1)-1))
Last Name =IF(ISERROR(FIND("*",E2,1)),"",RIGHT(E2,FIND("*",E2,1)-1))

This searches the name for the * and blanks out the last name if it is not found, and puts the whole name into first name.

-Jarrod
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,323
Messages
5,769,454
Members
425,549
Latest member
Bartekelese

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
Top