Excel: What determines evaluation order in a formula?

前端 未结 4 1568
Happy的楠姐
Happy的楠姐 2020-12-17 22:53

I have a worksheet with the following contents in A1:G1

7  8  4  2  9  11  10

Formula

=SUMPRODUCT(MIN($B1:$G1-$A1)) (1)
         


        
4条回答
  •  囚心锁ツ
    2020-12-17 23:39

    I think you were on course to investigate this using 'Formulas > Evaluate Formula'

    The results are for typical math operations: functions are evaluated from the inside out.

    Because =SUMPRODUCT(MIN(ABS($B1:$G1-$A1))) is not forced to evaluate as an array $B1:$G1 will return the value from that array from the same column from where the calling cell is located. I.e. if B2 = then $B1:$G1 will return B1, if A2= $B1:$G1 then it will try to return A1 but there is nothing to return so it gives you the #VALUE error.

提交回复
热议问题