Conditional Formatting Based on Text and Date Range

welshraz

New Member
Joined
Apr 29, 2016
Messages
25
I don't know why I can't grasp this, but I want to apply conditional formatting to column J based upon the text in column A, and then the date in column J.

Essentially, if column A does not include the words "Cancelled" or "Completed", I want to highlight the corresponding cell in column J, but the colour then needs to be dependent on how far away that date is from the current day: 10 days or less, 90 days or less, 183 days or less.

<> "Cancelled" <> "Completed" and less than 10 days from the current date - Red
<> "Cancelled" <> "Completed" and less than 10 days from the current date - Amber
<> "Cancelled" <> "Completed" and less than 10 days from the current date - Yellow

Everything else should be left with no fill. Thanks!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
60,820
Office Version
  1. 365
Platform
  1. Windows
Select column J, and then enter these CF formulas:

For Red:
Excel Formula:
=and(A1<>"Cancelled",A1<>"Completed",today()-J1<10)

For Amber:
Excel Formula:
=and(A1<>"Cancelled",A1<>"Completed",today()-J1>=10,today()-J1<90)

For yellow:
Excel Formula:
=and(A1<>"Cancelled",A1<>"Completed",today()-J1>=90,today()-J1<183)
 
Solution
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,821
Messages
5,766,638
Members
425,364
Latest member
jstubs99

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
Top