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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

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
 
Upvote 0

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
 
Upvote 0

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
 
Upvote 0

Forum statistics

Threads
1,187,188
Messages
5,962,112
Members
438,585
Latest member
peterLEE0223

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