I am using the following macro
Sub test()
Dim r As Range, m As Object
With CreateObject("VBScript.RegExp")
.Global = True: .IgnoreCase = True
.Pattern = "\b(eye|pain|irritation)\b"
For Each r In Range("a1", Range("a" & Rows.Count).End(xlUp))
For Each m In .Execute(r.Value)
With r.Characters(m.firstindex + 1, m.Length).Font
.Bold = True: .Color = vbRed
End With
Next
Next
End With
End Sub
to tag words within cells with certain colors, it works great. Is there a way to have a separate column showing the # of 'terms' that were tagged?
Example, if the word 'eye' appears in a cell 13 times, a separate column would show a 13
Bookmarks