Reformat name

RattlingCarp3048

Board Regular
Joined
Jan 12, 2022
Messages
166
Office Version
  1. 365
Platform
  1. Windows
I have a set of names i need to reformat. normally i would just separate out the names into helper columns and concat what i need from there. in this particular case i cannot do that. Sooo i have this formula which is close but not quite. Can someone help get me over the finish line?

C3 >>>A3
Snow, John F >>>John Snow
Snow, John >>>> John Snow
Snow Targaryen, John F >>> John Snow Targaryen

=MID(C3,SEARCH(",",C3)+1,LEN(C3)-SEARCH(",",C3)-1)&" "&LEFT(C3,SEARCH(",",C3)-1)

currently if there is no middle initial it is cutting off the last letter of the first name instead
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
How about
Excel Formula:
=LET(s,SEARCH(",",C3),m,TRIM(MID(C3,s+1,100)),LEFT(m,FIND(" ",m&" ")-1)&" "&LEFT(C3,s-1))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,272
Messages
6,123,981
Members
449,138
Latest member
abdahsankhan

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