how to put a comma between last name and first name but not first name and MI

dbwiz

Active Member
Joined
Nov 20, 2007
Messages
275
Scenario: A column of names that have last name space first name space and then a middle name or initial have to be converted to comma delimited text for uploading into a program. So for example if the Excel column has the names

Smith Joseph Edgar
Doe Sally J

when converted it needs to look like

Smith, Joseph Edgar
Doe, Sally J

I tried Edit Replace and Find all, I hit the tab key once and replaced with , but got

Smith, Joseph, Edgar,,,,,,

So that didn't work. Is there an easy way to do this?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Here's one way, there may be better ways.
Assuming your name is in A1.....
Code:
=LEFT(A1,FIND(" ",A1,1)-1)&","&MID(A1,FIND(" ",A1,1),255)
 
Upvote 0

Forum statistics

Threads
1,212,933
Messages
6,110,759
Members
448,295
Latest member
Uzair Tahir Khan

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