Alex Rivera | Logout

Split Uppercase words in Excel

Asked 2012-04-17T11:23:22.167
19

I would like to split all words in my cell by Uppercase, an example:

Original values:

MikeJones
RinaJonesJunior
MichealSamuelsLurth

Expected output:

Mike Jones
Rina Jones Junior
Micheal Samuels Lurth

Can this be done without using VBA?

Edit
Report

1 Answer

1

you have to do this with VBA.

Sub insertspaces()
Range("A1").Select
Do
    Row = ActiveCell.Row
    Column = ActiveCell.Column
    vlaue = ActiveCell.Value
    If vlaue = "" Then Exit Do
        Length = Len(vlaue)
        If Length > 1 Then
            For x = Length To 2 Step -1
            par = Mid(vlaue, x, 1)
            cod = Asc(par)
            If (cod > 64 And cod < 91) Or (cod > 191 And cod < 222) Then
            vlaue = Left(vlaue, x - 1) + " " + Mid(vlaue, x)
            End If
        Next
        ActiveCell.Value = vlaue
        End If
    Row = Row + 1
    Cells(Row, Column).Select
Loop
End Sub
answered 2012-04-17T13:03:38.680

Your Answer