View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default Separating words in a single cell

On Thu, 15 Jun 2006 11:11:02 -0500, ibere
wrote:


Hello there. This is my first post here, I hope this question is not too
stupid, but I have no idea on how to do it...:

I have a list of names like this:
JOHNSMITH

and I need to turn it into this:
JOHN SMITH

Is there a way to do it? I imagine the way is to ask Excel to include a
space between the capital letters, but I don't know how to do it.

Thanks!


Just as an addition to my previous post,

=REGEX.SUBSTITUTE(A1,"([A-Z])"," [1]",2)

will place a space before every capital letter except the first one.

So:

JohnSmith John Smith
JohnFranklinSmith John Franklin Smith
JohnFSmith John F Smith
JohnF.Smith John F. Smith


--ron