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
 

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

Similar Threads

Function help requested please 6
Excel Complex Summing 3
SUM multiple criteria 1
Summing Data 3
Carrying out calculations on segments of data from within a workbo 1
How do I make this happen 3
Yearly sum 3
sumif 1

Back
Top