I'm trying to make a colour scale based on Today() between another entered date, basically a scale that starts green to yellow to red. I've attempted to try For green: =DAYS(TODAY(),$I2)=0, For Yellow : =DAYS(TODAY(),$I2)=105, For red: DAYS(TODAY(),$I2)=105DAYS(TODAY(),$I2)=150. $I2 being the cell where I entered the date a document was completed. Is there a way to do this, thank you very much in advance.
-
1Welcome to Web Applications Stack Exchange. It is unclear whether you are formatting a range of cells (where a color scale would apply) or just a single cell (where you should use simple conditional formatting). Consider sharing a publicly editable sample spreadsheet.– doubleunaryCommented Dec 23, 2021 at 14:19
Add a comment
|
1 Answer
Conditional formatting rules are applied in the order they appear in the list. The first rule that evaluates to true will get applied, and the rest of the rules do not get evaluated nor applied.
Try these rules, in this order:
red:
=today() - I2 >= 150
yellow:
=today() - I2 >= 105
green:
=today() - I2 >= 0
See this answer for an explanation of how date and time values work in spreadsheets.