Share via

Manually overriding conditional formatting

Anonymous
2013-08-30T21:55:16+00:00

I have tried to allow manual overriding of conditional formatting using the advice from the following post:

http://answers.microsoft.com/en-us/office/forum/office_2007-excel/manual-override-of-conditional-formatting/717b6870-3127-4a6c-b24a-a3684ab02842?lc=4105&auth=1

I now have this function:

Function TestColor(MyRange As Range) As Boolean

     If Range(MyRange.Address).Interior.ColorIndex = xlNone Then TestColor = True

 End Function

Along with these 3 rules in order:

=NOT(TestColor(A1)) --> Stop If True

=MOD(ROW(0,2)=0   --> colors row with color1

=MOD(ROW(0,2)=1   --> colors row with color2

The alternate rows are being banded with the specified colors as desired. However, the first rule and the function seem to be having no effect whatsoever.

Where am I going wrong?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2015-04-22T15:38:16+00:00

    To turn conditional formatting on and off I usually set up some "On/Off" data validation drop down cells, then incorporate them into an =AND function in the conditional formatting, checking for whether they're "On", along with the original criteria.

    This way, you can have as many rules as you like, with the ability to turn them on or off individually.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-08-30T22:20:21+00:00

    FWIW, I have never had any resounding success when relying upon Stop if true. Why not simply incorporate the boolean function into the CF rule formulas with AND()?

    =AND(TestColor(A1), NOT(MOD(ROW(),2)))    ◄ banded color1

    =AND(TestColor(A1), MOD(ROW(),2))             ◄ banded color2

    Was this answer helpful?

    0 comments No comments