Conditional Formatting Between 2 Dates

johannes2008

New Member
Joined
Aug 20, 2010
Messages
45
Office Version
  1. 365
Platform
  1. Windows
Hello

I am trying to use conditional formatting so that cell A18 will go red if the value id D18 is greater then today's date but D19 is less then today's date. I want to repeat this for cells A18:A28

I have a number of steps in a process that happen weeks apart and the start date for those steps are listed in column D. What I am trying to do is have the cell corresponding with the current step we are in be highlighted so people can easily determine where we are in the process.

I used the below formula but it is not highlighting the correct cell.

=AND(D18>TODAY(),D19<TODAY())

The formatting in column D is "ddd, dd-mmm-yy"
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
1. Perhaps =AND($D18>TODAY(),$D19<TODAY())
2. Do you have real dates or text looking like dates ( in the latter case left aligned in the cell when no manual alignment applied)
Cell format is NOT relevant
 
Upvote 0
Hello

I am trying to use conditional formatting so that cell A18 will go red if the value id D18 is greater then today's date but D19 is less then today's date. I want to repeat this for cells A18:A28

I have a number of steps in a process that happen weeks apart and the start date for those steps are listed in column D. What I am trying to do is have the cell corresponding with the current step we are in be highlighted so people can easily determine where we are in the process.

I used the below formula but it is not highlighting the correct cell.

=AND(D18>TODAY(),D19<TODAY())

The formatting in column D is "ddd, dd-mmm-yy"
Hello @johannes2008
Use this formula in your conditional formatting to get what you want.
=AND(D18>A1,E18<A1)
In A1 you have the function: =TODAY()

You see, Conditional Formatting (CF) work on a TRUE/FALSE basis. If the condition is TRUE then the CF is applied. Any formula that returns TRUE/FALSE will work for CF. So here we are comparing the date in D18 to today's date and the date in E18 and if both conditions return TRUE bingo the CF is applied. Now since the TODAY() function is volatile, that means it changes at each recalculation of the Range/Worksheet/Workbook thus consuming resources you should use it sparingly.

Now that I gave you a starting point, my question to you is how will you handle the volatility of the TODAY() function? You may need to think about fixing the date so that it will not keep changing each time.

Let us know if you need any help.

Monty
 
Upvote 0

Forum statistics

Threads
1,223,578
Messages
6,173,165
Members
452,504
Latest member
frankkeith2233

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