tezza
Active Member
- Joined
- Sep 10, 2006
- Messages
- 384
- Office Version
- 2016
- 2010
- Platform
- Windows
- Web
Hi all,
I've got a list of conditional formats that need to go in a specific order (see below), no matter how I do it I can't get them right.
Please can someone help?
Office 365
I've got a list of conditional formats that need to go in a specific order (see below), no matter how I do it I can't get them right.
Please can someone help?
Office 365
Excel Formula:
Private Sub condformat()
'
' Macro6 Macro
'
'
Worksheets("RC_Call_Logs").Select
For Each TmpSht In ThisWorkbook.Sheets
TmpSht.Cells.FormatConditions.Delete
Next
Columns("I:I").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$M1=""No Start Time"""
'Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.599963377788629
End With
Selection.FormatConditions(1).StopIfTrue = False
Columns("J:J").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=I2>J2"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.799981688894314
End With
Selection.FormatConditions(1).StopIfTrue = False
Columns("K:K").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=COUNTA($A1:$M1)=1"
'Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
Selection.FormatConditions(1).StopIfTrue = True
Columns("K:K").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$H1-$K1>TIME(0,15,0)"
'Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent4
.TintAndShade = 0.399945066682943
End With
Selection.FormatConditions(1).StopIfTrue = False
End Sub