G
Guest
'Paste this macro in Worksheet_SelectionChange
'Type a sentence in Column "A" and select cell.
If ActiveCell.Column = 1 Then
rng = (ActiveCell.Text) & " "
l = Len(rng)
m = 1
k = 1
For i = 1 To l
If Mid(rng, i, 1) = " " Then
ActiveCell.Offset(0, m) = Mid(rng, k, i - k)
If Len(Mid(rng, k, i - k)) > 1 Then
m = m + 1
End If
k = i
End If
Next i
End If
'Type a sentence in Column "A" and select cell.
If ActiveCell.Column = 1 Then
rng = (ActiveCell.Text) & " "
l = Len(rng)
m = 1
k = 1
For i = 1 To l
If Mid(rng, i, 1) = " " Then
ActiveCell.Offset(0, m) = Mid(rng, k, i - k)
If Len(Mid(rng, k, i - k)) > 1 Then
m = m + 1
End If
k = i
End If
Next i
End If