Splitting string based on case

omnivl

Board Regular
Joined
Aug 25, 2014
Messages
53
Hi
Im a bit stuck on this one, i need to split a string based on a lowercase hitting an uppercase for example:

Data
Sam JonesPaul SmithEvan Angus WalshJon Smith

Output
Sam Jones;Paul Smith;Evan Angus Walsh;Jon Smith

I have the data in column D and there will be 50000 + rows
 
Thanks everyone, apologies for not replying sooner, the dreaded seasonal flu took hold (im located in Australia).
@Peter_SSs - i never gave thought to the last name issue, your solution has provided a 99.5% hit rate though only a few i have to manually correct

Appreciate the time everyone put in, it has saved some sleepless nights for me :)
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
i never gave thought to the last name issue, your solution has provided a 99.5% hit rate though only a few i have to manually correct
That sounds not too bad to me.:)
However, if you have to be doing this more times in the future, it might be worth posting a few examples (& expected results) where the code fails. You never know, perhaps an even better solution may turn up.
 
Upvote 0
That sounds not too bad to me.:)
However, if you have to be doing this more times in the future, it might be worth posting a few examples (& expected results) where the code fails. You never know, perhaps an even better solution may turn up.
I think the failure will happen for first names that have the lower/upper case embedded within them; for example, the first name MaryAnn. I'll be surprised if there is a way to handle them and also provide for last names with the lower/upper case embedded within the as well.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,482
Messages
6,125,060
Members
449,206
Latest member
Healthydogs

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