Problem with conditional formatting and dates

Thirith

Board Regular
Joined
Jun 9, 2009
Messages
118
I've got the following set of conditional formatting rules:

VmaDXPq.png


Problem with that is that for some weird reason, there are fields that aren't coloured: for instance, today is 6 March 2018 and the fields for 14 March 2018 aren't colour coded.

I assume the reason is that date values don't just check day, month and year but also time, so that any value that's over seven days but under eight days would fall between two rules. How do I best avoid this and make sure that only the date is considered in the calculation?
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Not sure, but try Today instead of Now
 
Upvote 0
My mistake please ignore
 
Last edited:
Upvote 0
Today doesn't seem to work (I can't find it in the list of built-in functions either), but I've tried the following: DateValue(Now()), and that seems to work. Not exactly elegant, mind you...
 
Upvote 0
I don't know if it is my computer, but I do not see your rules in your original post (some images do not come across for me).
What exactly is your Conditional Formatting formula?
 
Upvote 0
The formulas look like


Excel 2013 32 bit
A
1Value
2Value is between Now() and Now()+7
3Value is between Now() +8 and Now()+14
4Value is between Now() +15 and Now()+21
5Value > Now()+21
New
 
Upvote 0
I was using a set of rules like:
Value is Between Now() and Now() + 7
Value is Between Now() + 8 and Now() + 14
Etc.
 
Upvote 0
I believe that Access likes "Date()" instead of "Today()".
So try substituting "Date()" in where you have "Now()".
 
Upvote 0
Yes, I always have to think twice when thinking about how each system wants to return today's date without time.
I often mix them up! (Excel vs. Excel VBA vs. Access vs. Access VBA).
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

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