I have ID's in a column (currently Col K) and Codes currently in Column M. (Columns will be added but Codes will always be two columns to the right of ID.
I have the following code but how do I use Offset in the formula to look for an entry two columns to the right?
I don't want the formula to say look for Col M but to look at the data two columns to the right and see if there is an X there.
The larger recorded macro is:
Thank you for any help.
I have the following code but how do I use Offset in the formula to look for an entry two columns to the right?
I don't want the formula to say look for Col M but to look at the data two columns to the right and see if there is an X there.
VBA Code:
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$M4=""X"""
The larger recorded macro is:
VBA Code:
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$M4=""X"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark2
.TintAndShade = -9.99481185338908E-02
End With
Selection.FormatConditions(1).StopIfTrue = False
Thank you for any help.