+ Reply to Thread
Results 1 to 3 of 3

why is a cell testing out with >0 when its value appears to be 0?

  1. #1
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    why is a cell testing out with >0 when its value appears to be 0?

    I'm running into a weird issue with one of my workbooks, attached.

    One of the formulas (Cell T4) should only show a "S" if two conditions are met: AND(H4<0,U4>0)

    But even though to the best of my knowledge, U4 should be 0, it "tests out" as having a value >0. (see my test on row 9).

    I try to eliminate any minuscule fraction in U4 by using the rounddown(value,0) function, but that doesn't help.

    I also try to "see" any value by multiplying U4 times a huge number like 10,000,000,000, but that still doesn't help.

    Any ideas? If there is indeed a minuscule fraction in U4 I suppose I could create a nested formula in cell U4 that says if(AQ3*$W$1,and(>0,<1),0).

    But it will help me as I do my work to know what is really going on. (one chance being that I've got a blind spot!)
    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: why is a cell testing out with >0 when its value appears to be 0?

    It will work if you change the formula:

    HTML Code: 
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: why is a cell testing out with >0 when its value appears to be 0?

    But even though to the best of my knowledge, U4 should be 0
    Why do you think U4 should be 0? If I follow what the formula in U4 is doing, A4 is blank, so U4 will return empty string "" -- which is not the same thing as 0. "" is a short text string, but still a text string. In my testing, all text strings are "greater than" (whatever that means when comparing numbers and text) all numbers. So "">0, "">456, "">125696, and "">1E300 (close to the largest number Excel can store) will all return TRUE, because text is greater than numbers.

    Modytrane's solution is to replace the empty string "" output with the number 0 -- and maybe that will fit into the desired logic of this sequence of formulas. It's not clear to me how this test fits into your overall logic sequence, so I cannot say if replacing "" with 0 will be a suitable replacement. That should at least explain why U4>0 is TRUE when A4 is blank.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Testing cell equality with <> fails if cell is empty?
    By bsabiston in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-22-2019, 09:46 AM
  2. Replies: 5
    Last Post: 04-23-2013, 05:11 PM
  3. [SOLVED] Testing colour of cell and result cell not updating automatically
    By BishBosh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2013, 08:55 AM
  4. Replies: 18
    Last Post: 07-30-2012, 01:29 AM
  5. Testing For A Blank Cell
    By mattnorman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2010, 08:39 AM
  6. testing for color of a cell
    By jsniderfamily in forum Excel General
    Replies: 2
    Last Post: 09-27-2007, 03:17 PM
  7. Testing a cell for value
    By goofy78270 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-13-2007, 09:00 AM

Tags for this Thread

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