Sumif with min() criteria

excelhjalp

New Member
Joined
Aug 7, 2018
Messages
33
Office Version
  1. 365
Platform
  1. Windows
Hi!

I'm trying to do sumif function that calculates sum of the first column within a given month. So here I would like to find out the sum of the first column within november, so the criteria would be the stated date, or 30.11.22, whichever's the smallest. Is there a magic solution? I'd prefer not to make a dummy column.

Thanks! :D

1670596709841.png
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
How about
Excel Formula:
=SUMIFS(R39:R44,Q39:Q44,">="&DATE(2022,11,1),Q39:Q44,"<"&DATE(2022,12,1))
 
Upvote 0
Solution
How about
Excel Formula:
=SUMIFS(R39:R44,Q39:Q44,">="&DATE(2022,11,1),Q39:Q44,"<"&DATE(2022,12,1))
Hi Fluff! And thank you kindly for your brilliant answer! It works very well!
Would you be able to come up with a solution if I make the problem slightly more difficult? In this scenario I want to find the total number of days within each month based on two date columns. I think sumifs might work but am not sure if I'm correct. Can you think of a formula for that?
So for October in the first date range there would be 14, in the second there would be 14 but in the third there would be 30.11.22-20.11.22 which is 10 etc..

1670604382235.png
 
Upvote 0
As this is a totally different question, it needs a new thread. Thanks
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,376
Members
449,080
Latest member
Armadillos

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