Conditional Formatting Based on Date Column

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
287
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
Good Morning and Happy (belated) New Year Team Mr. Excel.

I am trying to figure out how to do conditional formatting on my spreadsheet. (Excerpt below in a XL2BB format) My goal is to grey-out (for lack of a better term) any rows where the date (Column A) is in the future. The table includes future expected items, however they are not "official" until the date arrives and is earned.

While I am able to use the Conditional Formatting built in option Highlight Cell Rules > Greater Than on Column A and setting it to =NOW() and it colored Column A as expected I cannot get it to format the additional columns even when changing the "applies to" value to $A$2:$I$2000, what it did was color everyone except the cells in A that are less than today's date. I had also tried to use a formula in Conditional Formatting of =$A2>NOW() and applying it from $A$2:$I$2000 but it does not work.

Any assistance you can provide would be greatly appreciated.

Leave_Use_Plan_FY2021.xlsx
ABCDEFGHI
1ANNUAL LEAVE DateLeave TypeNOTEDHMLEAVE MINUTESAL BALFY DAYS MUST USE
2Monday, August 31, 2020ALBALANCE6965529395AL BAL: 69D 06H 55MMUST USE: 24D 06H 55M
3Wednesday, September 2, 2020ALFY20 SPEND-10028975AL BAL: 68D 06H 55MMUST USE: 23D 06H 55M
4Thursday, September 3, 2020ALFY20 SPEND-10028555AL BAL: 67D 06H 55MMUST USE: 22D 06H 55M
5Friday, September 4, 2020ALFY20 SPEND-10028135AL BAL: 66D 06H 55MMUST USE: 21D 06H 55M
6Tuesday, September 8, 2020ALFY20 SPEND-10027715AL BAL: 65D 06H 55MMUST USE: 20D 06H 55M
7Wednesday, September 9, 2020ALFY20 SPEND-10027295AL BAL: 64D 06H 55MMUST USE: 19D 06H 55M
8Thursday, September 10, 2020ALFY20 SPEND-10026875AL BAL: 63D 06H 55MMUST USE: 18D 06H 55M
9Friday, September 11, 2020ALFY20 SPEND-10026455AL BAL: 62D 06H 55MMUST USE: 17D 06H 55M
10Wednesday, September 30, 2020ALIncrement +203527330AL BAL: 65D 00H 30MMUST USE: 20D 00H 30M
11Tuesday, October 20, 2020ALFY20 SPEND-10026910AL BAL: 64D 00H 30MMUST USE: 19D 00H 30M
12Wednesday, October 21, 2020ALFY20 SPEND-10026490AL BAL: 63D 00H 30MMUST USE: 18D 00H 30M
13Thursday, October 22, 2020ALFY20 SPEND-10026070AL BAL: 62D 00H 30MMUST USE: 17D 00H 30M
14Friday, October 23, 2020ALFY20 SPEND-10025650AL BAL: 61D 00H 30MMUST USE: 16D 00H 30M
15Monday, October 26, 2020ALFY20 SPEND-10025230AL BAL: 60D 00H 30MMUST USE: 15D 00H 30M
16Saturday, October 31, 2020ALIncrement +203526105AL BAL: 62D 01H 05MMUST USE: 17D 01H 05M
17Tuesday, November 10, 2020ALFY20 SPEND-10025685AL BAL: 61D 01H 05MMUST USE: 16D 01H 05M
18Thursday, November 12, 2020ALFY20 SPEND-10025265AL BAL: 60D 01H 05MMUST USE: 15D 01H 05M
19Tuesday, November 17, 2020ALFY20 SPEND-10024845AL BAL: 59D 01H 05MMUST USE: 14D 01H 05M
20Thursday, November 19, 2020ALFY20 SPEND-10024425AL BAL: 58D 01H 05MMUST USE: 13D 01H 05M
21Wednesday, November 25, 2020ALFY20 SPEND-10024005AL BAL: 57D 01H 05MMUST USE: 12D 01H 05M
22Monday, November 30, 2020ALIncrement +203524880AL BAL: 59D 01H 40MMUST USE: 14D 01H 40M
23Thursday, December 10, 2020ALFY20 SPEND-10024460AL BAL: 58D 01H 40MMUST USE: 13D 01H 40M
24Friday, December 11, 2020ALFY20 SPEND-10024040AL BAL: 57D 01H 40MMUST USE: 12D 01H 40M
25Friday, December 18, 2020ALfY20 SPEND-10023620AL BAL: 56D 01H 40MMUST USE: 11D 01H 40M
26Tuesday, December 22, 2020ALFY20 SPEND-10023200AL BAL: 55D 01H 40MMUST USE: 10D 01H 40M
27Wednesday, December 23, 2020ALFY20 SPEND-10022780AL BAL: 54D 01H 40MMUST USE: 09D 01H 40M
28Monday, December 28, 2020ALFY20 SPEND-10022360AL BAL: 53D 01H 40MMUST USE: 08D 01H 40M
29Tuesday, December 29, 2020ALFY20 SPEND-10021940AL BAL: 52D 01H 40MMUST USE: 07D 01H 40M
30Wednesday, December 30, 2020ALFY20 SPEND-10021520AL BAL: 51D 01H 40MMUST USE: 06D 01H 40M
31Thursday, December 31, 2020ALIncrement +203522395AL BAL: 53D 02H 15MMUST USE: 08D 02H 15M
32Sunday, January 31, 2021ALIncrement +203523270AL BAL: 55D 02H 50MMUST USE: 10D 02H 50M
33Sunday, February 28, 2021ALIncrement +203524145AL BAL: 57D 03H 25MMUST USE: 12D 03H 25M
ANNUAL LEAVE PLAN
 

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
I had also tried to use a formula in Conditional Formatting of =$A2>NOW() and applying it from $A$2:$I$2000 but it does not work.
This should definitely work (I do stuff like this all the time).
If it does not, check for the following:
1. Your dates in column A are really dates and not text (can be confirmed with a formula like =ISNUMBER(A2) )
2. There are no other Conditional Formatting conditions being applied to the same range that might be interfering with it
3. There is no VBA code that might be interfering with it
4. You didn't forget to actually select the desired formatting (sounds silly, but I have actually forgotten this step once or twice!)

To verify it should, try setting up the same scenario on a new blank workbook, and see if you can get that to work.
 
Solution

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
287
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
1. Your dates in column A are really dates and not text (can be confirmed with a formula like =ISNUMBER(A2) )
Yes they are all date

Screen Shot 2021-01-12 at 8.20.31 AM.png

Screen Shot 2021-01-12 at 8.24.05 AM.png

It turned out that when I saved the condition, it put the formula in Quotes. Once I removed the quotes it actually worked as expected.

Thank you for confirming that I was on the right track.

Best
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
It turned out that when I saved the condition, it put the formula in Quotes. Once I removed the quotes it actually worked as expected.
Ah yes, that would treat the whole thing as Text (it is literally checking for the text "$A2>NOW()" in the cells).
Glad you got it working!
 

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
287
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
At least you guidance proved that I was using the right logic. Thank you!
 

Watch MrExcel Video

Forum statistics

Threads
1,127,316
Messages
5,623,955
Members
416,002
Latest member
t10k14

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