Reputation: 245
I want to create multiple rules for conditional formatting of some cells, say A1:A15. The rule must be applied based on some external cell value. For example If my XX cell has value less than 5 then R1 applies to A1:A15, if not then R2 applies to A1:A15. I tried the formula to below, but it didn't work:
=IF(AND($B$5<=21,$C$5<=21),"=AND($F$6<=$C$5,$F$6>=$B$5)")
Can this be done?
Upvotes: 0
Views: 378
Reputation: 59485
My understanding of the requirement is that either of two distinct conditions should have the same effect (ie apply the same formatting to the given range). For this an OR condition may suit, hence a CF formula rule such as:
=OR(AND($B$5<=21,$C$5<=21),AND($F$6<=$C$5,$F$6>=$B$5))
naturally with Applies to =$A$1:$A$15
.
Upvotes: 0
Reputation: 927
You can just create two separate rules in the Conditional Formatting Rules Manager. The first is based on the cell being less than 5, and the second being that it is greater or equal to 5. If you want an external reference rather than inserting "5", then just put the cell reference (such as $A$1) in the conditional formatting rule.
Upvotes: 0