Sum based on Range Criteria

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

Guest

I have a formula that I created based on other examples that I saw in the
discussion group. Just wondering if this is the simplest formula for this
example. I am using this formula to sum all values in column BC when values
in BD are greater/equal to 500 but less than 600.

=SUMPRODUCT(--(BD$5:BD$98>=500),--(BD$5:BD$98<600),BC$5:BC$98)

Also, can someone explain what the -- prior to the criteria does?
 
Nothing wrong with your formula, here's another way using SUMIF

=SUM(SUMIF(BD$5:BD$98,{">=500",">=600"},BC$5:BC$98)*{1,-1})

which is the equivalent of two SUMIFs


=SUMIF(BD$5:BD$98,">=500",BC$5:BC$98)-SUMIF(BD$5:BD$98,">=600",BC$5:BC$98)
 
Back
Top