Forum Discussion
Conditional Formatting Not Consistent
I have attached a workbook with two tabs. The Good tab behaves as I would like.
There are several rows of values. If the entry directly below is different, then the text is red. If the entry directly above is different, then the text is underlined.
The Conditional Formatting for both tabs are exactly the same, but the behavior is different. (see A28 and A41)
Any thoughts on how to fix the Bad one?
(The Bad tab was extracted from a much more complex workbook, so just starting from scratch is not a desirable option.)
At one point I created and ran a macro to update Conditional Formatting. Could that have corrupted something? The macro is still in the attached workbook.
"Good" Conditional Formatting
"Bad" Conditional Formatting
Good cell A28 is underlined, Bad is not.
Thanks!
The difference here is that in Bad for red rule you applied Underline None
and for Good just skipped it
You may move Red rule in Bad sheet on second place (which is easier) or recreate Red rule with nothing for underline, and Bad becomes Good.
6 Replies
- SergeiBaklanDiamond Contributor
By the way, for better readability you may simplify formulas a bit like =A4<>A16, but that's only cosmetic.
- SergeiBaklanDiamond Contributor
The difference here is that in Bad for red rule you applied Underline None
and for Good just skipped it
You may move Red rule in Bad sheet on second place (which is easier) or recreate Red rule with nothing for underline, and Bad becomes Good.
- StevenCohenCopper Contributor
Thanks for looking carefully at this. I thought I had recreated the formatting exactly, but I obviously missed something.
One more question - the first rule says underline None and Red, but the second rule says underline Single. Should the second rule override the first, and make a single underline?
- SergeiBaklanDiamond Contributor
If different rules trigger the same property first one has priority. For example, if we have rules which change only one same property, background color, here
all cells will be green, and if change the order
all cells will be yellow.
In general it's better to follow "one color - one rule", or in more details, "one cell property - one rule".
In your case with one of the rules you force to remove underlines, with another one push to have them. On the same data range. First one triggers the property, rest ignore it after that.