SUMPRODUCT Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,
I'm having trouble using the SUMPRODUCT formula. It is the first time I
have tried to use it. Below is some sample data.

Field 1 Field 2

Surrender 2
Disbursment 2
Surrender 1
Surrender 2

I am using the following formula:
=SUMPRODUCT((B2:B5)=2)*(A2:A5="Surrender")
I want the formula to return the value 2 as the combination of Surrender and
2 occurs 2 times. However it is returning the value of 0. Any help or
direction is greatly appreciated.
Thanks,

Mate.
 
=SUMPRODUCT(--(B2:B5=2),--(A2:A5="Surrender"))

or

SUMPRODUCT((B2:B5=2)*(A2:A5="Surrender"))
 
Peo

I hope you don't mind me using this thread to ask a related question, but
what does "--" do in the formula you supplied?
 
The double unary minus combination coerces a TRUE or FALSE boolean variable
to a number 1 or 0.
 
Back
Top