bug of conditional formatting?

6diegodiego9

Board Regular
Joined
Jan 9, 2018
Messages
80
Office Version
  1. 2016
Platform
  1. Windows
I can't explain the fact that "6" is left red instead than blue:

1663240550768.png


1663240643077.png


Is this a known bug of conditional formatting?

I only used simple font color and background formatting in both the rules, no more than this:

1663240763344.png


1663240829336.png



The two cells are originally not colored:

1663240992911.png
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Is this a known bug of conditional formatting?
NO, it's doing exactly what it's meant to do.

The top rule takes priority over all other rules, so the cell remains with a red font.
With your 2nd example, your formats are different so it applies the fill colour for 6, but keeps the font red.
 
Upvote 0
When you have multiple rules with overlapping true portions (i.e. anything greater than 5 meets BOTH of your rules criteria), you need to distinguish which rule "wins" in thos situations.

There are a few ways you can do that. One is to order them properly (like Fluff mentions) and maybe make use of the "Stop if True" checkboxes (on the far right side of your rules). This ensures that once a higher order rule's conditions are met, it stops there and does not check the other rules.

Another option is to re-write your rules so that you have no overlap between them (this is my preference, as then order of rules does not matter).
So maybe replace your:
Excel Formula:
=A1>3
rule with this:
Excel Formula:
=AND(A1>3,A1<=5)
 
Upvote 0
NO, it's doing exactly what it's meant to do.

The top rule takes priority over all other rules, so the cell remains with a red font.
With your 2nd example, your formats are different so it applies the fill colour for 6, but keeps the font red.

The window says "Rule (applied in order shown)", so I expect it to color red first, and blue second. If I do the same (red then blue) with two consecutive VBA lines, it's left blue.
Where does your contrasting rule "The top rule takes priority over all other rules" come from?
 
Upvote 0

Forum statistics

Threads
1,215,212
Messages
6,123,653
Members
449,111
Latest member
ghennedy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top