Using Dates in Conditional Formatting

M

Marie FP

I’m using conditional formatting to change the color of a cell to blue if the
date entered in that cell is less than today’s date. The formula works fine
as long as there’s any date in the cell. The problem is when the cell is
empty, it is also turns blue, but I would like it to have no formatting. I
tried to fix this by adding a second condition, but it still didn’t work.
Does anyone know how I can fix this? My conditions look like this:

Condition 1: Forumla Is =G3<TODAY() ---> color is blue.
Condition 2: Cell Value Is equal to 0 ---> color is no color
 
J

JP Ronse

Hi Marie,

try something like

=AND(G3<TODAY();G3>0)

AFAIK, conditions are handled sequentially, so the second condition is
skipped when the first met the criteria.

Wkr,

JP
 
G

Gord Dibben

Put it all in Condition1

=AND(ISNUMBER(G3),G3<TODAY())

Delete Condition2


Gord Dibben MS Excel MVP
 
M

Marie FP

JP, I think the semicolon after "TODAY()" was a typo, so I changed it to a
comma, and it worked great. Also, the tip about conditions working
sequentially is good to know (which I didn't). Thanks very much!!
 
C

Chip Pearson

JP, I think the semicolon after "TODAY()" was a typo,

It depends on JP's locale. Some countries use a semi-colon as a list
separator where we in the US would use a comma.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top