Conditionally format a cell based on the date in another cell

knham1987

New Member
Joined
Jul 22, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am putting together a tracking spreadsheet whereby we have tasks that need to be done in relation to an end date.

For example, a welcome email needs to be sent 3 weeks before the date. If the cell is still blank TWO weeks before and up to the date of, I'd like the cell to be yellow. On or after the date, I'd like it to go red. What I need is the formula to use with my conditional formatting rules (I assume I need two) that will tell excel to use the color [DATE]-21 days inclusive and [DATE]+any days.

Can I do this in Excel?

Thanks in advance!

Kelly
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to the Board!

You should be able to use Conditional Formatting to do this, but we will need to know a few details, such as:
1. What cell this "end date" is in?
2. What is the cell containing the date that you want to conditional format?

So we are looking for cell addresses for both of those questions.
 
Upvote 0
Excel Sample.Conditional Formatting.jpg


In Column F, F4 should reference F2's date and, if TODAY is 21 days before F2, no color, if TODAY is ,= 20 days before F2, yellow, if TODAY is greater than or equal to F2, RED

Right now, I one formula: =TODAY()>=$F$2+20 (yellow) and this is working but I can't get one for RED to work...

Thanks!
 
Upvote 0
If I understand you properly, this should be the Conditional Formatting formula for the red fill:
Excel Formula:
=AND(F4="",TODAY()>F$2)
and this should be the Conditional Formatting formula for the yellow fill:
Excel Formula:
=AND(F4="",(TODAY()+21)>F$2)

And be sure to have the red rule run first in the order of Conditional Formatting formulas, and "Stop if true"
1626982161617.png
 
Upvote 0

Forum statistics

Threads
1,215,032
Messages
6,122,770
Members
449,095
Latest member
m_smith_solihull

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