How to sum values in between

  • Thread starter Thread starter MC
  • Start date Start date
M

MC

Rows ColumA Colum B
1 50 1000
2 100 2500
3 150 3000
4 200 1500

I want to sum the values in the columm be which are
greater than 50 but less than 200. I tried sumif as well
as using ANd it does not work.

Help
 
Hi
one way:
=SUMPRODUCT(--(A1:A100>50),--(A1:A100<200),B1:B100)

or
=SUMIF(A1:A100,">50",B1:B100)-SUMIF(A1:A100,">=200",B1:B100)
 
MC said:
Rows ColumA Colum B
1 50 1000
2 100 2500
3 150 3000
4 200 1500

I want to sum the values in the columm be which are
greater than 50 but less than 200. I tried sumif as well
as using ANd it does not work.

Help

Hi,

I'm assuming you mean add the values in Column B whose corresponding
values in Column A are greater than 50 and less than 200. I so, try:

=SUMPRODUCT(--(A1:A4>50),--(A1:A4<200),B1:B4)

Hope this helps!
 
In addition to the other approaches, you can use SUMIF, but it only
accepts a single condition, so you use

=SUMIF(A1:A4,">50")-SUMIF(A1:A4,">=200")

Jerry
 
Back
Top