Function SplitBold(r As Range, Optional bBold As Boolean = True) As String
Dim i As Long
Dim bBoldFound As Boolean
For i = 1 To InStr(InStr(1, r.Value & " ", " ") + 1, r.Value & " ", " ") - 1
If r.Characters(i, 1).Font.Bold Then
bBoldFound = True
If bBold Then
SplitBold = Mid(r.Value, i, InStr(i, r.Value & " ", " ", 1) - i)
Else
SplitBold = Left(r.Value, i - 1) & Mid(r.Value, InStr(i, r.Value & " ", " ", 1) + 1)
End If
Exit For
End If
Next i
If Not bBoldFound And Not bBold Then SplitBold = r.Value
End Function
Function SplitBold(r As Range, Optional bBold As Boolean = True) As String
Dim i As Long, pos As Long
Dim Words As Variant
Dim sBold As String, sUnbold As String
If r.Cells.Count = 1 And Len(r.Cells(1).Value) Then
Words = Split(r.Value)
pos = 1
For i = 0 To UBound(Words)
If r.Characters(pos, 1).Font.Bold Then
sBold = sBold & " " & Words(i)
Else
sUnbold = sUnbold & " " & Words(i)
End If
pos = pos + Len(Words(i)) + 1
Next i
If bBold Then
SplitBold = Mid(sBold, 2)
Else
SplitBold = Mid(sUnbold, 2)
End If
End If
End Function