hello & thank you for your time checking this out! Many years ago this was cooked up by someone here & it has been extraordinarily useful. A suggested tweak was that this code be made to work only for a selected range of cells. I'm a hack & in no way have the experience or the ability to modify this change...would it even be possible?
Here's the code:
Public Sub wordBold()
Dim WkSh As Worksheet
Dim lRow As Long
Dim aText As Variant
Dim iIndex As Integer
Dim iPosition As Integer
Dim iLength As Integer
Set WkSh = Worksheets("data") 'your_sheetname
aText = Array("Green^") 'search_words Mon, Oct 29, 2012, update Sun, Jun 12, 16, Thu, Nov 11, 17
For lRow = 1 To WkSh.Cells(Rows.Count, 1).End(xlUp).Row
WkSh.Range("N" & lRow).Font.ColorIndex = xlAutomatic 'update column if needed!
For iIndex = 0 To UBound(aText)
iPosition = InStr(WkSh.Range("N" & lRow).Value, aText(iIndex)) 'update column if needed!
If iPosition > 0 Then
iLength = Len(aText(iIndex))
WkSh.Range("N" & lRow).Characters(Start:=iPosition, Length:=iLength).Font.Bold = True 'update column if needed!
WkSh.Range("N" & lRow).Characters(Start:=iPosition, Length:=iLength).Font.ColorIndex = 3 'red=3, black=1, blue 5
End If
Next iIndex
Next lRow
End Sub
Here's the code:
Public Sub wordBold()
Dim WkSh As Worksheet
Dim lRow As Long
Dim aText As Variant
Dim iIndex As Integer
Dim iPosition As Integer
Dim iLength As Integer
Set WkSh = Worksheets("data") 'your_sheetname
aText = Array("Green^") 'search_words Mon, Oct 29, 2012, update Sun, Jun 12, 16, Thu, Nov 11, 17
For lRow = 1 To WkSh.Cells(Rows.Count, 1).End(xlUp).Row
WkSh.Range("N" & lRow).Font.ColorIndex = xlAutomatic 'update column if needed!
For iIndex = 0 To UBound(aText)
iPosition = InStr(WkSh.Range("N" & lRow).Value, aText(iIndex)) 'update column if needed!
If iPosition > 0 Then
iLength = Len(aText(iIndex))
WkSh.Range("N" & lRow).Characters(Start:=iPosition, Length:=iLength).Font.Bold = True 'update column if needed!
WkSh.Range("N" & lRow).Characters(Start:=iPosition, Length:=iLength).Font.ColorIndex = 3 'red=3, black=1, blue 5
End If
Next iIndex
Next lRow
End Sub