Rearrange the Jumbled words in same same row

     

    Sub JumbledNames_In_a_Cell()
    Dim sh As Worksheet
    Set sh = ThisWorkbook.Sheets("JumbledNames")
    Dim str As String
    For r = 2 To 11
    sh.Range("D" & r).Clear
    str = Trim(sh.Cells(r, 1).Value)
    postsplit = Split(str, " ")
    Dim jumppostsplit As String
    jumbstr = Trim(sh.Cells(r, 3).Value)
    jumbpostsplit = Split(jumbstr, " ")
    If UBound(postsplit) <> UBound(jumbpostsplit) Then
    Exit For
    End If
    For s = 0 To UBound(postsplit)
    For j = 0 To UBound(jumbpostsplit)
    If postsplit(s) = jumbpostsplit(j) Then
    sh.Range("D" & r).Activate
    sh.Range("D" & r).Value = sh.Range("D" & r).Value & postsplit(s) & " "
    Exit For
    End If
    Next
    Next
    sh.Range("D" & r).Value = Trim(sh.Range("D" & r).Value)
    sh.Range("D" & r).Activate
    Cellformating
    Next
    End Sub


    Function Cellformating()
    With ActiveCell
    .Font.Size = 15
    .Font.ColorIndex = 5
    .Font.Bold = True
    .HorizontalAlignment = xlLeft

    End With
    End Function


    Download The Workbook