Below is my current code for the particualr range I'm having an issue with. The highlighted line is the first issue I run into and I think it might have something to do with a section of code prior to that line in the code below. If I "select" this range it will work fine but I'm trying to avoid doing that to loop through each sheet.
'SECTOR
'LESS THAN
.Range("N9:N1200,O7").FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, Formula1:="=0"
With .Range("N9:N1200,O7").FormatConditions(1).Font
.Bold = True
.Color = -16777024
End With
With .Range("N9:N1200,O7").FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent2
.TintAndShade = 0.799981688894314
End With
.Range("N9:N1200,O7").FormatConditions(1).StopIfTrue = False
'GREATER THAN
.Range("N9:N1200,O7").FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, Formula1:="=0"
With .Range("N9:N1200,O7").FormatConditions(2).Font
.Bold = True
.Color = -11489280
End With
With .Range("N9:N1200,O7").FormatConditions(2).Interior
.PatternColorIndex = xlAutomatic
.Color = 13365426
End With
.Range("N9:N1200,O7").FormatConditions(2).StopIfTrue = False
'INSERTING ARROWS
.Range("N9:N1200,O7").FormatConditions.AddIconSetCondition
With .Range("N9:N1200,O7").FormatConditions(1)
.IconSet = ActiveWorkbook.IconSets(xl3Arrows)
End With
.Range("N9:N1200,O7").FormatConditions(1).IconCriteria(1).Icon = xlIconRedDownArrow
With .Range("N9:N1200,O7").FormatConditions(1).IconCriteria(2)
.Type = xlConditionValueNumber
.Value = 0
.Operator = 7
End With
With .Range("N9:N1200,O7").FormatConditions(1).IconCriteria(3)
.Type = xlConditionValueNumber
.Value = 0
.Operator = 7
.Icon = xlIconGreenUpArrow
End With
Bookmarks