Conditional Formatting based on a formula

RichCowell

Board Regular
Joined
Dec 5, 2013
Messages
121
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I've got a spreadsheet with dates in two columns, the date in the second column is calculated automatically based on the date in the first column.

I need to apply Conditional Formatting to the cells in the second column so if the difference between that cell and today's date is greater than 90, make it green, between 1-90 orange, and 0 or under red.

Just concentrating on the first part initially, I've got the following formula for anything above 90, however, it doesn't change the formatting:

="(Value(M6)-Value(TODAY())>90)"

(M6 is in the second column, and is the top of the dates)

Can anyone point me in the right direction?
 
Last edited:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Assuming M6 is a numerical date
TODAY() is ALWAYS a number, you dont need to do a VALUE() on it.

Select the range you want highlight

Conditional Formatting
New Rule
Use a formula to determine...

=(M6-TODAY()<=0)
Format as red

=(M6-TODAY()>1)
Format as orange

=(M6-TODAY()>90)
Format as green
 
Last edited:
Upvote 0
Thanks! I'd added the VALUE() to TODAY() clutching at straws...
That seems to be working nicely, thanks!
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,715
Members
448,985
Latest member
chocbudda

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