+ Reply to Thread
Results 1 to 2 of 2

Getting zero when a non-zero result is correct and expected.

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    Long Beach, WA
    MS-Off Ver
    Excel 2013
    Posts
    87

    Getting zero when a non-zero result is correct and expected.

    I'm working on a fairly complicated spreadsheet and am debugging various formulas.
    Often I've seen this happen:
    A cell which should not be zero, is showing zero.
    When I run Evaluate Formula, it all works as expected and ends with a numerical value as expected and intended. Then the final evaluation of the numerical value ends with a zero value in the cell.

    What's going on here?

    Here is one of the formulas:
    =+IF( AND(AX109<>0, OR( AND(O$15, P$15, AI110=0, AI109<>0, AO110=0,AO109<>0), AND(O$11, P$11,NOT(AND(O$15,P$15)), AI110=0,AI109<>0), AND(O$13, P$13,NOT(AND(O$15,P$15)), AO110=0,AO109<>0), AND(O$33,P$33,IF(O$34*BO109>BP109,TRUE,FALSE)), AND(O$18,P$18,Y110=0,Y109<>0),AND(O$24,P$24,AC110=0,AC109<>0),AND(O$31,P$31,AD110=0))),AX109,0)

    In this case, the last term is operative:
    AND(O$31,P$31,AD110=0))),AX109,0)

    AND(O$31,P$31,AD110=0) is TRUE (all the other terms in the OR are FALSE) and the AX109<>0 is TRUE.
    So, in the result, we should see the value from AX109
    And, indeed, the value in AX109 shows up in Evaluate Formula
    The Evaluate Formula ends up with IF(TRUE,AX109,0) and next shows the value of AX109 only as a number and then when pressing Evaluate again, goes to zero.
    The result in the cell is zero.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: Getting zero when a non-zero result is correct and expected.

    Please post a sample workbook with some typical data.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Replies: 1
    Last Post: 09-17-2012, 09:35 AM
  2. COUNTIF not returning expected result
    By zpenacho in forum Excel General
    Replies: 3
    Last Post: 01-20-2012, 06:37 PM
  3. SUMIF - not returning expected result
    By Paul Sheppard in forum Excel General
    Replies: 4
    Last Post: 08-16-2011, 11:43 AM
  4. Replies: 3
    Last Post: 05-17-2008, 05:25 AM
  5. [SOLVED] Using sum(1/countif....) not returning expected result
    By Kent (thanks) in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-11-2006, 11:40 AM

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