Hi all,
So far I've been okay with conditional formatting, until now. I'm trying to format G2:P2 based on the value in P2. What I have seems to show the right values when I open up Conditional Formatting/Manager Rules, but only G is actually getting formatted.
Sub TEST()
Dim LR As Long
LR = Range("A1").CurrentRegion.Rows.Count
Range("G2", "P" & LR).FormatConditions.Add Type:=xlExpression, Formula1:="=P2=6"
With Range("G2", "P" & LR).FormatConditions(1)
.Interior.Color = 5287936
.Font.ThemeColor = xlThemeColorDark1
.Font.Bold = True
.StopIfTrue = False
End With
End Sub
Formula =P2=6
Applies to =$G$2:$P$1130
So far I've been okay with conditional formatting, until now. I'm trying to format G2:P2 based on the value in P2. What I have seems to show the right values when I open up Conditional Formatting/Manager Rules, but only G is actually getting formatted.
Sub TEST()
Dim LR As Long
LR = Range("A1").CurrentRegion.Rows.Count
Range("G2", "P" & LR).FormatConditions.Add Type:=xlExpression, Formula1:="=P2=6"
With Range("G2", "P" & LR).FormatConditions(1)
.Interior.Color = 5287936
.Font.ThemeColor = xlThemeColorDark1
.Font.Bold = True
.StopIfTrue = False
End With
End Sub
Formula =P2=6
Applies to =$G$2:$P$1130