Forum Discussion

TheOldPuterMan's avatar
TheOldPuterMan
Brass Contributor
Apr 09, 2019

Sum error Excel 2016 (Insider) Windows 10 Pro x64 (1809)

Having a weird error trying to sum a column of values. The formula is written so that if a key cell is empty (""), the array that the formula (-1) will be summed and the total appears in that cell.

 

The results are always 0.00 in the cell until you look at the execution of the formula. When the condition to trigger the SUM occurs the correct total is produced (+$224.23) BUT is immediately overwritten by the results of the "FALSE" side of the IF statement which is $0.00. The FALSE branch would be taken if the trigger column was not = ""... but not when it is.

 

Normally, when evaluating a formula, if you hit a FALSE condition the next step replaces the TRUE code with an #N/A and the next step it to execute the first step in the FALSE branch. Not so here. Both sides of the TRUE/FALSE statement are intact and after executing the FALSE statements the TRUE statements are executed.

I know, confusing but I am stuck!!

I've attempted to attach 3 screenshots showing what is happening. (1) shows the formula as is, (3) is after evaluation to the correct total (+$224.23) and (4) shows the end result of $0.00.

 

I hope I'm just really tired lol (Recovering from 2 surgeries in 11 days, drugs DO NOT help the thought process).

 

Thanks to anyone than tosses a bone my way. If the screenshots didn't come through, give me a yell. They tell the tale.

 

Thanks,

 

TheOldPuterMan

John

 

 

8 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    John, I was not able to reproduce on a simple model. Are you on the latest Insiders build (1904.11601.20042)? Previous one was quite buggy.

     

    TheOldPuterMan 

    • TheOldPuterMan's avatar
      TheOldPuterMan
      Brass Contributor

      SergeiBaklan 

       

      I think what's happening here is that I'm trying to execute a new set of commands from within the Spill of the Array commands and it's getting confused.

       

      Below are the two formulas, the first that works most of the time and the second that produces a blank cell ("") as its result.

       

      Works: {=IF(COUNTA(UNIQUE(Transactions!Expense_Center))+2=ROW(),"TOTALS",SORT(UNIQUE(Transactions!Expense_Center)))}

      Doesn’t Work: {=IF(COUNTA(UNIQUE(Transactions!Expense_Center))+2=ROW(),"TOTALS",SORT(UNIQUE(Transactions!Expense_Center)))}

       

      Both are running against a 1 x 300 array on another (Transactions) sheet. 

       

      What I get, from the second, non-working, formula is that in the final step, as it should fill the cell with "TOTALS" is a blank cell from the Spill of the UNIQUE function. Prior to this, there was always a single entry of 0 (zero) that represented the blank values in Transactions!Expense_Center. The above formula looked at that, compared the 0 (zero) to the null ("") and found a true condition which caused the cell to be loaded with "TOTALS".

       

      Now though seems to no longer work.

       

      As far as I know, I've had no Office updates and other than the messed up update to 1809 no O/S updates that should affect this.

       

      ANY help here I'd love it. I have tried separating the formula into different steps but haven't had success there yet.

       

      Thanks for looking,

       

      TheOldPuterMan

       

      John

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        TheOldPuterMan 

        John, perhaps I misunderstood the issue, tried both with empty and null cell with your formula, and with one which returns the same (non-array)

        =IF(LEN(SORT(UNIQUE(exp)))=0,"Total",SORT(UNIQUE(exp)))

        - all work

        simple model is attached

    • TheOldPuterMan's avatar
      TheOldPuterMan
      Brass Contributor

      SergeiBaklan 

       

      Sergei,

       

      Yes, I am. In fact, the (one) reason I'm so slow in getting back is that I did a system reset and Microsoft left me in in a bad spot. The updated deleted ALL of my USB drivers and did not install any new ones.

       

      I had to dig out my trusty old PS/2 keyboard and remember how to work my way through device manager with tab and cursor keys. I finally got a set of USB drivers installed for the mouse and then started rebuilding my system.

       

      I didn't lose data but the past few days have been Interesting. On top of it my wife walked in with the chest/head cold from hades and had to share it with me. I've been down with that for the past 4 days and haven't done anything.

       

      I appreciate your helpful suggestions and THINK I have an inkling to what's happening. 

       

      I'll get back to you later, after more testing.

      TheOldPuterMan

      John

       

Resources