How to sum values in between

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
 
F

Frank Kabel

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)
 
D

Domenic

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!
 
J

Jerry W. Lewis

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top