sum ifs multiple criteria and between values

IvanYerk

Board Regular
Joined
Aug 26, 2018
Messages
61
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
This is only my 2nd post, but the 1st one was so helpful, I'm going back to the well. I have a formula that isn't working the way I think it should:

=SUM(SUMIFS(c2:c9,b2:b9,{">=6037","<=6332",4010},a2:a9,{100,101,134,136,141,355,357})) ---- How can I fix this???

[TABLE="width: 335"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Dept[/TD]
[TD]Acct[/TD]
[TD]Amt[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]100[/TD]
[TD]6000[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]200[/TD]
[TD]6100[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]141[/TD]
[TD]6107[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]100[/TD]
[TD]6108[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]355[/TD]
[TD]6109[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]141[/TD]
[TD]6110[/TD]
[TD]35[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]357[/TD]
[TD]4010[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]100[/TD]
[TD]5000[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hey Ivan,

Please keep in mind, that it is always best to not include your starting point (how your data looks), but your ending point as well (how you want your data to look... or in other words... your expected results).

With that said, can you please clarify a few things?

1) What does the 4010 indicate within the formula? Are you saying that you want greater than or equal to 6037 AND less than or equal to 6332, but also include 4010 as well?
2) Why are you typing in these amounts {100,101,134,136,141,355,357} ? Are they not subject to change?
 
Upvote 0
Sorry about that, great suggestion and I'll definitely be more clear in future posts. The answer to both of your questions is YES.
 
Upvote 0
no problem. Try out the below and let me know if that works for you.

Code:
=SUM(SUMIFS($C$2:$C$9,$B$2:$B$9,">=6037",$B$2:$B$9,"<=6332",$A$2:$A$9,{100,101,134,136,141,355,357})) + SUM(SUMIFS($C$2:$C$9,$B$2:$B$9,4010,$A$2:$A$9,{100,101,134,136,141,355,357}))
 
Last edited:
Upvote 0
Breaking it up did the trick! I have a habit of trying to skinny down the formula as small as possible and clearly sometimes it just can't and needs to be broken up into its parts.

Thanks for your help!!!! I really appreciate it!!!
 
Upvote 0
You're welcome, glad to help.

Fyi, if you have a habit of doing that, then you might also have a habit of not using helper columns when creating spreadsheets... helper columns can be a huge 'help' (pun intended) when creating spreadsheets (makes formulas less complex, easier to alter, easier to read), so don't shy away from them. Best of luck, come back anytime.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

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