question about matrix formule

  • Thread starter Thread starter Andre
  • Start date Start date
A

Andre

Hi,

let consider this (in cell A1 through B3):

bob 10
bill 8
bob 5

With the matrix formule {=sum(if(a1:b3="bob";b1:b3)}, i get 15 (the sum for
Bob).

My question:

1) why has the IF function not three parts like if(test;action if true;
action if not true)? Is this another IF function?

Thanks
Andre
 
Hi
if you don't specify the third condition (the false part) Excel
automatically returns FALSE
Try this with a simple formula like
=IF(A1="X","X in cell A1")
and try what happens if A1 does not equal 'X'

The SUM function then ignores the boolean value FALSE

Note: Instead of this formula you could use
=SUMIF(A1:A10,"Bob",B1:B10)

without the need for array entering
 
thanks


Frank Kabel said:
Hi
if you don't specify the third condition (the false part) Excel
automatically returns FALSE
Try this with a simple formula like
=IF(A1="X","X in cell A1")
and try what happens if A1 does not equal 'X'

The SUM function then ignores the boolean value FALSE

Note: Instead of this formula you could use
=SUMIF(A1:A10,"Bob",B1:B10)

without the need for array entering
 
Interestingly,
if(a=b,1) returns false when false, but
if(a=b,1,) returns 0 when false, and
if(a=b,,1) returns 0 when true
 
Back
Top