SUMIF a specific date falls within a month

Tatum2020

New Member
Joined
Nov 25, 2020
Messages
37
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,

I am trying to sum data where the date falls within a specific month in a year. Please see how my excel is structured:

1614865529130.png


Please help!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
MrExcelPlayground.xlsm
BCDE
2811/2/202050November-20200
2911/22/2020100December-20150
3011/24/202050January-21150
3112/19/2020100February-21250
3212/28/202050March-21200
331/6/2021100April-21150
341/23/202150
352/1/2021100
362/7/202150
372/16/2021100
383/9/202150
393/21/2021100
403/26/202150
414/20/2021100
424/24/202150
Sheet29
Cell Formulas
RangeFormula
E28:E33E28=SUMIFS($C$28:$C$42,$B$28:$B$42,">="&DATE(YEAR(D28),MONTH(D28),1),$B$28:$B$42,"<="&EOMONTH(D28,0))
 
Upvote 0
MrExcelPlayground.xlsm
BCDE
2811/2/202050November-20200
2911/22/2020100December-20150
3011/24/202050January-21150
3112/19/2020100February-21250
3212/28/202050March-21200
331/6/2021100April-21150
341/23/202150
352/1/2021100
362/7/202150
372/16/2021100
383/9/202150
393/21/2021100
403/26/202150
414/20/2021100
424/24/202150
Sheet29
Cell Formulas
RangeFormula
E28:E33E28=SUMIFS($C$28:$C$42,$B$28:$B$42,">="&DATE(YEAR(D28),MONTH(D28),1),$B$28:$B$42,"<="&EOMONTH(D28,0))
Thank you James. Does it matter how the date format is in column B?
 
Upvote 0
Does it matter how the date format is in column B?
Excel formulas do not care about the date format applied to cells. Formatting only affects the appearance, not the values, in the cells.
Formulas only look at the values, and not the formats.
So as long as the entries are entered as dates, and not text, it shouldn't matter the date format that you choose.
 
Upvote 0
I also tried to do a COUNTIF with the same dataset and formulas. And it didn't work. Would you be able to assist?
If JamesCanale's SUMIFS formulas worked for your first question, you should be able to use the same details in COUNTIFS to do what you want. Just be aware that the arguments are in a little different order, as SUMIFS has one more argument than COUNTIFS.

See: MS Excel: How to use the COUNTIFS Function (WS)
 
Upvote 0
Excel formulas do not care about the date format applied to cells. Formatting only affects the appearance, not the values, in the cells.
Formulas only look at the values, and not the formats.
So as long as the entries are entered as dates, and not text, it shouldn't matter the date format that you choose.
That is helpful. Thank you!
 
Upvote 0
You are welcome.
 
Upvote 0
Hi,

Apologies me again (totally clueless when it comes to excel). I used the above formula to sum cells that are on the same row and I keep getting #VALUE error. Do I need to replace SUMIF with SUMPRODUCT? And how would that formula work?

Sorry for the silly questions!
 
Upvote 0
Please post the exact formula you are trying, and tell us what cell you are putting the formula in.
 
Upvote 0

Forum statistics

Threads
1,215,193
Messages
6,123,560
Members
449,108
Latest member
rache47

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