简体   繁体   中英

Conditional Formatting on cells with the result of a formula

I have a list of domains that my company owns. In the control panel it doesn't show an expiration date but we always choose a two year option on the domain.

What I have figured out is how to calculate how many days are left till renewal. But what I can't figure out is how to apply a 3 color coded conditional formatting on the cells that return the number days till renewal.

Example:

Here is the formula to find the number of days left.

=DATEVALUE("16-July-2016")-TODAY()&""

So I am trying to get numbers from:

  • 0-100 a red color
  • 101-400 a yellow color
  • 401-730 a green color

I keep trying to apply it to the cells with that show the days left, but it won't show any color.

Can anyone help?

With &"" at the end of your formula, the result outputs as TEXT, and Conditional Formatting is trying to evaluate numbers. Set your formula to just =DATEVALUE("16-July-2016")-TODAY() and see if that fixes it.

Maybe three separate rules, applied to whichever column your values (excluding &"" ) are in (here assumed to be A ):

SO24873783示例

In Excel, Home -> Conditional Formatting. See this introduction on Conditional Formatting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM