Conditional Formatting (Dates)

karmaimages

Board Regular
Joined
Oct 1, 2009
Messages
112
Office Version
  1. 365
Platform
  1. Windows
Hi

I'm looking for some assistance with some cells that contain dates and filling them based on a set criteria.

I can't seem to get it to work. what I'm trying to do is:

Date = Today or Past 7 days = Fill Green
Date = > 7 days fill red
Date = Blank - No fill

Anyone provide some guidance on this?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
1) It would help if you specified the cell references. I'll assume A1:A10
2) > 7 days what does that mean? 7 days from now or more than 7 days ago? See below...

Select the cells A1:A10

Conditional Formatting
New Rule
Use a formula to determine...
3 formulas required

=AND(A1<=TODAY(),A1>=TODAY()-7)
format as green

if more than 7 days ago
=AND(A1<>"",A1<TODAY()-7)

or

if more than 7 days in future
=AND(A1<>"",A1>=TODAY()>7)

format as red
 
Upvote 0
Typo . . . ?

The board has corrupted my posted and its too late to change it now.
Yep several typos.
2 formulas required.

Select the cells A1:A10

Conditional Formatting
New Rule
Use a formula to determine...
2 formulas required

=AND(A1 <= TODAY(),A1 >= TODAY()-7)
format as green

if more than 7 days ago
=AND(A1 <> "",A1 < TODAY()-7)
or

if more than 7 days in future
=AND(A1 <> "",A1 >= TODAY()+7)

format as red
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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