Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel - Conditional Formatting - Cell not blank and equals 0

I'm trying to check if a cell is:

  1. blank, and if false (not blank)
  2. If value equals 0. I have tried:

    =IF( NOT( ISBLANK($D:$D) ) & $D:$D=0 ,TRUE,FALSE)

    =IF( AND( NOT( ISBLANK($D:$D) ),$D:$D=0) ,TRUE,FALSE)

I am use Excel 2013 with Conditional Formatting rule: Use a formula to determine which cells to format > Format values where this formula is true

What am I doing wrong? The problem is, the IF($D:$D=0) recognises cells with value 0 and those which are blank as true. I only want it to recognise 0 values. Not blank.

like image 530
KickAss Avatar asked Sep 04 '13 20:09

KickAss


Video Answer


2 Answers

I think this is what you're looking for:

=AND(COUNTBLANK($D1)=0,$D1=0)

Note that when you apply it to the whole column, each cell will only look at its respective row. You'll want to keep the reference of $D1 instead of using $D:$D

like image 155
tigeravatar Avatar answered Oct 06 '22 10:10

tigeravatar


You can also use this formula

=($D1<>"")*($D1=0)

like image 43
barry houdini Avatar answered Oct 06 '22 08:10

barry houdini