Manipulating text string via clean, proper, right

KoE

Board Regular
Joined
Dec 6, 2004
Messages
51
Guys,

Pardon my ignorance but these got me stumped. I've received an excel file which contains name and personal id both keyed into the same cell separated by "enter" key.

I've used clean, proper and right functions separately to get to this sample output:
Excel Workbook
BCDE
2AZURA BINTI GHAZALI841228-03-5952AZURA BINTI GHAZALI841228-03-5952Azura Binti Ghazali841228-03-5952841228-03-5952
3TAN SEW PING850909-07-5014TAN SEW PING850909-07-5014Tan Sew Ping850909-07-5014850909-07-5014
Sheet


If you guys could help, could the 3 functions (clean, proper, right) be combined in a shot plus any additional function(s) so that the output will just be name and personal id in 2 separate columns?

thanks!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I could be wrong, but it seems like they were probably seperated by using alt+enter: if this is the case, to take the name, try =PROPER(TRIM(LEFT(B2,FIND(CHAR(10),B2)-1))) to get the name; And =TRIM(RIGHT(B2,LEN(B2)-FIND(CHAR(10),B2))) to get the number.


***trim() is probably not necessary in this case, I just had it in there when I wrote the formula out of habit and decided to leave it there when pasting in.
 
Upvote 0
Thanks a lot guys! The original cells are a bit more messy than I originally thought of (multiple carriage returns and whatnots) but the formula you guys gave help giving a good kick-start :)
 
Upvote 0

Forum statistics

Threads
1,215,528
Messages
6,125,342
Members
449,218
Latest member
Excel Master

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