I'm trying to use VBA to do conditional formatting for an entire row and I have four conditions, the formatting will change dependent on the text in the "A" column.
I don't want to have to manually run a macro every time something is changed in the "A" column.
I can get it to work great with only 3 conditions but I haven't been able to find code to format the whole row and also format it without manually running a macro each time the text in the cells of column "A" is changed.
The following is part of the macro I recorded to get the correct colors I wanted but I couldn't get much further without errors.
Any help is appreciated.
Thank you,
Rolly
[vba]Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=INDIRECT(""A""&ROW())=""Completed"""
Selection.FormatConditions(1).Interior.ColorIndex = 4
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=INDIRECT(""A""&ROW())=""In Process"""
Selection.FormatConditions(2).Interior.ColorIndex = 6
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=INDIRECT(""A""&ROW())=""On Hold"""
Selection.FormatConditions(3).Interior.ColorIndex = 45
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=INDIRECT(""A""&ROW())=""Cancelled"""
Selection.FormatConditions(3).Interior.ColorIndex = 8[/vba]