Conditional Formatting

D

DaveMoore

A column in my spreadsheet, 'D', is formatted to hh:mm
Cells may contain values of 00:00 or be blank.
I wish to conditionally format so that values of 00:00 are highlighted
'Red'.
I have been successful in doing this but find that blank cells are
also highlighted 'Red'. I understand that excel treats blank cells as
having a zero value.

Is there a conditional format I can add so that blank cells are not
highlighted?

I have tried these -

Condition 1. Cell Value Is Equal to 0 - format pattern = Red
Condition 2. Cell Value Is Not Equal to 0 - format pattern = White

Condition 1. Cell Value Is Equal to 0 - format pattern = Red
Condition 2. Cell Value Is Equal to "" - format pattern = White

Can anyone help?

Many Thanks,
Dave Moore
 
J

joeu2004

A column in my spreadsheet, 'D', is formatted to hh:mm
Cells may contain values of 00:00 or be blank.
I wish to conditionally format so that values of 00:00
are highlighted 'Red'. [....]
Is there a conditional format I can add so that blank
cells are not highlighted?

Ostensibly, select the column or range of cells, select Formula Is
from the Conditional Formatting drop-down menu, and enter the
following CF formula:

=AND(D1<>"",D1=0)

Caveat: D1=0 works well to recognize 00:00 (hh:mm) only if column D
has time __constants__. Otherwise, there might be additional fraction
digits, be it due to non-zero seconds or computer binary arithmetic
anomalies. In that case, the following selects the condition format
when D1 __appears__ as 00:00:

=AND(D1<>"",HOUR(D1)=0,MINUTE(D1)=0)
 

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