I need more than 3 conditional formats, but cannot seem to get past the usual 3. I wrote a simple marco with 3 of them, as such:
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Completed"""
Selection.FormatConditions(1).Interior.ColorIndex = 42
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Approved"""
Selection.FormatConditions(2).Interior.ColorIndex = 43
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Pending Approval"""
Selection.FormatConditions(3).Interior.ColorIndex = 45
then I tried to add additional ones. But it always gives me an error message "Run-time error '1004':", and has the fourth format line in yellow. How do I get past the 3 formats? Thanks.
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Completed"""
Selection.FormatConditions(1).Interior.ColorIndex = 42
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Approved"""
Selection.FormatConditions(2).Interior.ColorIndex = 43
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Pending Approval"""
Selection.FormatConditions(3).Interior.ColorIndex = 45
then I tried to add additional ones. But it always gives me an error message "Run-time error '1004':", and has the fourth format line in yellow. How do I get past the 3 formats? Thanks.