I am using the code below to format cells that contain "HWD" or "PH". This is working fine as long as that is the only text contained in the cell, is there a way to modify this code to still format the cell even when other text may be in the same cell. For example; a cell in the identified range may contain RAS, PMT, HWD, the code below will not format this cell.
Hope the code is posted correctly! Thanks in advance for any help on this issue.
Code:
Range("I9:I73,I77:I141,I145:I174,I178:I207,I211:I240,I244:I263,I267:I286").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""HWD"""
Selection.FormatConditions(1).Interior.ColorIndex = 3
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""PH"""
Selection.FormatConditions(2).Interior.ColorIndex = 3