Is there an opposite function to CONCATENATE?

NeilF

Board Regular
Joined
Sep 4, 2007
Messages
100
I have discovered the useful CONCATENATE function, which I have typically been using to combine 2 cells with surname (b1) and first name (a1).

eg. =CONCATENATE(B1, ", ", A1) returns in "Smith, John" where cell A1 contained "John" and B1 contained "Smith".

My question is whether there is a function (or a method) by which that process could be reversed. ie. To take a cell containing "Smith, John" and return 2 adjacent cells, one containing John and next containing Smith.

Sounds simple, but I suspect it is far from easy....!

Thanks

Neil
 
VBA has a Split function, but there isn't an equivalent Excel function, unfortunately. You can use formulas like:

=LEFT(A1,FIND(",",A1)-1)

=TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1)))
 
Upvote 0
Thank you both.

I'm not really at VBA level(!), but I've just tried using Text to Columns, which I didn't know about previously (thank you Momentman).

That seems to work very well. The one legacy thing it leaves me with is the space at the start of the first name cell. Is there an easy way to strip that out (or ideally have it removed as part of the Text to Columns process)?

Thanks

Neil
 
Upvote 0

Forum statistics

Threads
1,226,849
Messages
6,193,321
Members
453,790
Latest member
yassinosnoo1

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