Sum If Multiple Ifs

blarrabee

New Member
Joined
Jul 22, 2009
Messages
39
Platform
  1. MacOS
  2. Web
Trying to sum numbers under the following conditions:


Sum If

2009!Q is greater than B and less than C

and 2009!I = A

any help would be appreciated.

Thanks!
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
=SUMPRODUCT(--(2009!Q1:Q100>B1:B100),--(2009!Q1:Q100 < C1:C100),--(2009!I1:I100="A"))

I have a related question, and this example is a good one to work with. I've been using SUMPRODUCT off and on over the years, but am failing to remember one trick:

What if, in the example above, I want the last condition to be equal to "A" OR "B"? What is the syntax?
 
Upvote 0
I have a related question, and this example is a good one to work with. I've been using SUMPRODUCT off and on over the years, but am failing to remember one trick:

What if, in the example above, I want the last condition to be equal to "A" OR "B"? What is the syntax?
A couple of ways...


Best method:

Use cells to hold the criteria:
  • A1 = A
  • A2 = B
Then:

=SUMPRODUCT(--(Q1:Q100>B1:B100),--(Q1:Q100 < C1:C100),--(ISNUMBER(MATCH(I1:I100,A1:A2,0))))

Or, like this:

=SUMPRODUCT((Q1:Q100>B1:B100)*(Q1:Q100 < C1:C100)*(I1:I100={"A","B"}))
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,626
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top