Split capital words

i have a messy sheet where names have become joined together -MsandMr MariaPapadimaAlexandrosIlias
. All i need to do is split them at each capaital letter to sort it out. How do I do this?

thanks

With MsandMr MariaPapadimaAlexandrosIlias in A1

=REGEX(A1;"([^ ])([[:upper:]])";"$1 $2";"g")

That keeps Msand though… but it inserts a blank before each upper letter that is not preceded by a blank already.

thanks, where do i type that?

i can do the ‘and’ by search and replace and with (space)and

Well, as your question was for Calc, I’d presume into some Calc cell other than A1, no? …

But you can do a regular expression Find&Replace (Ctrl+H) as well.

  • Find: ([^ ])([[:upper:]])
  • Replace: $1 $2
  • [x] Match case
  • Other options: [x] Regular expressions
1 Like

Brilliant thanks. My knowledge is limited, and I don’t know about cell codes so that solution worked for me.

Much appreciated !

1 Like