Split String from Right

Blessy Clara

Board Regular
Joined
Mar 28, 2010
Messages
201
Hi

There are about 10,000 rows of address

Sample
[TABLE="width: 423"]
<colgroup><col></colgroup><tbody>[TR]
[TD]243 River Street Ballina[/TD]
[/TR]
[TR]
[TD]Bundaberg[/TD]
[/TR]
[TR]
[TD]Dunsborough[/TD]
[/TR]
[TR]
[TD]Suite 5 Kawana Prof Cnt 134A Pt Cartwright Drive Buddina[/TD]
[/TR]
[TR]
[TD]Suite 3/170 Gooding Drive Merrimac[/TD]
[/TR]
[TR]
[TD]1 Bangalow Road Ballina[/TD]
[/TR]
[TR]
[TD]921 Station St, Box Hill North[/TD]
[/TR]
[TR]
[TD]112 Drummond Street North, Ballarat[/TD]
[/TR]
[TR]
[TD] [TABLE="width: 347"]
<tbody>[TR]
[TD="class: xl68, width: 347"]173 Hampton Street, Bridge town

[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Requirement - Want to split the string from Right

with the First space for those without coma
[TABLE="width: 487"]
<tbody>[TR]
[TD="class: xl68, width: 423"]243 River Street [/TD]
[TD="width: 64"]Ballina[/TD]
[/TR]
</tbody>[/TABLE]

and for those records with coma it should be the first occurrence of coma from right
112 Drummond Street North Ballarat
[TABLE="width: 347"]
<tbody>[TR]
[TD="class: xl68, width: 347"]173 Hampton Street Bridge town[/TD]
[/TR]
</tbody>[/TABLE]
Those highlighted in Red to be split to next columns

Using Text to column or Formula may not be helpful as the count/length of string varies

Thank you
 
Does this direct formula do what you want?

Excel Workbook
AB
1243 River Street BallinaBallina
2Suite 5 Kawana Prof Cnt 134A Pt Cartwright Drive BuddinaBuddina
3Suite 3/170 Gooding Drive MerrimacMerrimac
41 Bangalow Road BallinaBallina
5921 Station St, Box Hill NorthBox Hill North
6112 Drummond Street North, BallaratBallarat
7173 Hampton Street, Bridge townBridge town
Split Text
 
Last edited:
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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