how to set criteria between 2 numerical values?

  • Thread starter Thread starter Cam
  • Start date Start date
C

Cam

Hello,

I am trying to look for a correct formula to return the sum of the range
between the operation range. I tried this, but didn't work as it returns zero.
Sample data:
A B C D E
10 2
20 1.5
30 12.0
40 4

=SUMIF($A$6:$A$64,">=20 And <=30",$B$6:$B$64)

Result want: 1.5 + 12.0 = 13.5

Any sugguestion is appreciated.
 
SUMIF won't let you do more than 1 criteria (I hear you can in 2007), but
this will work for you:

=SUMPRODUCT(($A$6:$A$64>=20)*($A$6:$A$64<=30)*($B$6:$B$64))
 
Back
Top