Conditional Formatting based on Date and Data within Cells

pawcoyote

Board Regular
Joined
Mar 5, 2012
Messages
89
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am working on a workbook and having a bit of an issue. It seems that these two Conditional Formatting Formulas do not work nicely together.

The first code is to fill in the cell red if Today's date is past the date in D13 as long as G13 Has Open or Hold in it
The second code is to fill in the cell yellow if Today's date is within the next 7 days of the date in D13 as long as G13 has Open or Hold in it.

Color Fill is Red - Past Today's Date
Excel Formula:
=AND(AND(NOT(ISBLANK($D13)),TODAY()>$D13),OR($G13="Open",$G13="Hold",ISBLANK($G13)))

Color Fill is Yellow - Within Next 7 days of Today's Date
Excel Formula:
=AND(AND(NOT(ISBLANK($D13)),TODAY()>$D13-7),OR($G13="Open",$G13="Hold",ISBLANK($G13)))

What is happening is The yellow code is making the cells all yellow even when D13 is past the due date of today. It isn't filling for dates that are within 7 days... Those remain without a fill in color.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Try changing the order of the rules, so that the Red fill is before the yellow fill
 
Upvote 0
Solution
Try changing the order of the rules, so that the Red fill is before the yellow fill
Thank you once again. Also I had +7 not the -7 in my yellow saw that once I did the change in order. You are the best...
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,737
Members
449,050
Latest member
excelknuckles

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