It still finds the word believe no matter if it has the "s" or the "ed" on the end, but of course it will not highlight the entire word.
If there is a more succinct macro that is fine with me.
Code: Select all
Sub HighlightStrings()
Application.ScreenUpdating = False
Dim Rng As range
Dim cFnd As String: cFnd = "believe"
Dim xTmp As String
Dim x As Long
Dim m As Long
Dim y As Long: y = Len(cFnd)
For Each Rng In range("G2", range("G" & Rows.Count).End(xlUp))
With Rng
m = UBound(Split(Rng.Value, cFnd))
If m > 0 Then
xTmp = ""
For x = 0 To m - 1
xTmp = xTmp & Split(Rng.Value, cFnd)(x)
With .Characters(Start:=Len(xTmp) + 1, Length:=y)
.Font.ColorIndex = 3
.Font.Underline = xlUnderlineStyleSingle
End With
xTmp = xTmp & cFnd
Next
End If
End With
Next Rng
Application.ScreenUpdating = True
End Sub