+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : IF Statement not work on empty cells

  1. #1
    Registered User
    Join Date
    05-15-2012
    Location
    Blackhawk
    MS-Off Ver
    Excel 2007
    Posts
    3

    IF Statement not work on empty cells

    Can someone please explain why my "if" statement isn't being applied to empty cells?

    If the numbers in columns "N," "O", and "P" meet the criteria stated in my "if" statement, then in column "Q" there will be a 0. Otherwise, there will be a 1.

    Note: There are formulas in columns "N," "O," and "P." If the calculation does not apply to cells in those columns (because no data was provided), then there was will be a "".

    Here is what I have in column "Q":

    IF(OR(MAX(N1:O1)>0.01,MIN(N1:O1)<-0.01,P1>0.80,P1<-0.80),0,1)

    I have also set conditional formatting to the "Q" column so that if there is a 0, the cell will be red. Otherwise, the cell color will not change.

    When there is a blank cell in columns "N," "O," or "P" column "Q" automatically has a 0 (even though an empty cell doesn't meet the criteria stated in the "if" statement). Can you please explain why that happens?

    Thanks!
    Last edited by runjacquerun; 05-15-2012 at 12:32 PM.

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: IF Statement not work on empty cells

    The P1>0.80 will return TRUE if P1's formula returns "" because Excel treats any text value (including "") as being greater than any numeric value. So any time P1 is "" you will get a 0 result.

  3. #3
    Registered User
    Join Date
    05-15-2012
    Location
    Blackhawk
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: IF Statement not work on empty cells

    Cutter, thank you so much for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1