Display MoreHere is one approach, if your text is in A1.
Sub x()
Dim oMatches As Object, i As Long, vOut As Variant, r As Range
Set r = Range("A1")
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = "\b(\w+)"
If .Test(r) Then
Set oMatches = .Execute(r)
ReDim vOut(0 To oMatches.Count - 1)
For i = 0 To oMatches.Count - 1
vOut(i) = oMatches(i).firstindex + 1
Next i
For i = LBound(vOut) To UBound(vOut)
r.Characters(vOut(i), 1).Font.Bold = True
Next i
End If
End With
End Sub
StephenR,
If you have in a cell:
One two Three
Your code result is:
One two Three