Code:
Sub AddFormCond()
With Range("A2:I2").FormatConditions.Add( _
Type:=xlExpression, _
Formula1:="=$A2=""SAP""")
.Interior.Color = RGB(255, 128, 0)
.Font.Color = RGB(0, 0, 0)
.StopIfTrue = False
.Font.Bold = True
End With
With Range("A2:I2").FormatConditions.Add( _
Type:=xlExpression, _
Formula1:="=$A2=""RP""")
.Interior.Color = RGB(0, 102, 204)
.Font.Color = RGB(0, 0, 0)
.StopIfTrue = False
.Font.Bold = True
End With
End Sub
I am using the above code to add some conditional format to cells.
I would like the Text centered but nothing I try centers the Text.
Any help here is appreciated.