SumIFS Question for Dates

Guzzlr

Well-known Member
Joined
Apr 20, 2009
Messages
946
Office Version
  1. 2016
Platform
  1. Windows
Hello
Using SumIFS, one of my criteria_range is in the foramt of Date mm/dd/yyyy. However, the Criteria is just the month
For example:
In column F:F I have all dates of 2023 and 2024 in mm/dd/yyyy.
In column A:A I have the months abriviated: Oct, Nov, Dec, Jan...so on
I wish to be able to use Nov, as my criteria for the criteria_range of F:F with the format of mm/dddd/2023. so all numbers in my Sum_Range would be found and added for Nov of 2023.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Please post a sample of your data and expected results for us to see.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
1st Quarter 2024_CM-PM_Active vs Complete Worksheet.xlsx
ABCDEFGHIJKLMN
23A - High Sustain3B - Medium Sustain3C - Low Sustain3A - High Sustain3B - Medium Sustain3C - Low Sustain
3
4
5YearMonthActiveCompletedMonthDateActiveCompletedActiveActiveActiveCompletedCompletedCompleted
62023Oct29286Oct10/1/202301000010
72023Nov45310Oct10/2/2023211011353
82023Dec65324Oct10/3/20231170102114
92024Jan126524Oct10/4/202308000044
102024Feb163325Oct10/5/2023010000073
112024Mar100Oct10/6/2023212011255
122024Apr00Oct10/7/202301000100
13Oct10/8/202301000100
14Oct10/9/202304000211
15Oct10/10/202307000052
16Oct10/11/20231200100146
17Oct10/12/20230210005115
18Oct10/13/202307000322
Data-CM
Cell Formulas
RangeFormula
C6:C12C6=SUMIF($E$6:$E$500,B6,$G$6:$G$5000)
D6:D12D6=SUMIF($E$6:$E$500,B6,$H$6:$H$5000)
G6:G18G6=SUM(I6:K6)
H6:H18H6=SUM(L6:N6)
I6:I18I6=COUNTIFS(NexGen!$M:$M,'Data-CM'!F6,NexGen!$E:$E,'Data-CM'!$I$5,NexGen!$D:$D,'Data-CM'!$I$2)
J6:J18J6=COUNTIFS(NexGen!$M:$M,'Data-CM'!F6,NexGen!$E:$E,'Data-CM'!$J$5,NexGen!$D:$D,'Data-CM'!$J$2)
K6:K18K6=COUNTIFS(NexGen!$M:$M,'Data-CM'!F6,NexGen!$E:$E,'Data-CM'!$K$5,NexGen!$D:$D,'Data-CM'!$K$2)
L6:L18L6=COUNTIFS(NexGen!$M:$M,'Data-CM'!F6,NexGen!$E:$E,'Data-CM'!$L$5,NexGen!$D:$D,'Data-CM'!$L$2)
M6:M18M6=COUNTIFS(NexGen!$M:$M,'Data-CM'!F6,NexGen!$E:$E,'Data-CM'!$M$5,NexGen!$D:$D,'Data-CM'!$M$2)
N6:N18N6=COUNTIFS(NexGen!$M:$M,'Data-CM'!F6,NexGen!$E:$E,'Data-CM'!$N$5,NexGen!$D:$D,'Data-CM'!$N$2)
A6:A8A6=TEXT(F6,"yyyy")
E6:E18E6=TEXT(F6,"mmm")
 
Upvote 0
So you can see where I wish to have my SumIf be able to include the year in column F, instead of having to individually write in the Year and month in column A&B.
Thank you
 
Upvote 0
Will this work for you ?

Book3
ABCDEFGHIJKLMN
23A - High Sustain3B - Medium Sustain3C - Low Sustain3A - High Sustain3B - Medium Sustain3C - Low Sustain
3
4
5YearMonthActiveCompletedMonthDateActiveCompletedActiveActiveActiveCompletedCompletedCompleted
62023Oct07Oct10/01/202301000010
72023Nov120Oct10/02/2023211011353
82023Dec021Oct10/03/20231170102114
92024Jan00Oct10/04/202308000044
102024Feb00Oct10/05/2023010000073
112024Mar00Oct10/06/2023212011255
122024Apr00Oct10/07/202301000100
132023Jun212Oct10/08/202301000100
14Oct10/09/202304000211
15Oct10/10/202307000052
16Oct10/11/20231200100146
17Oct10/12/20230210005115
18Oct10/13/202307000322
Data-CM
Cell Formulas
RangeFormula
C6:C13C6=SUMIFS($G$6:$G$5000, $F$6:$F$5000,">="&DATEVALUE("01-"&B6&"-"&A6), $F$6:$F$5000,"<="& EOMONTH(DATEVALUE("01-"&B6&"-"&A6),0))
D6:D13D6=SUMIFS($H$6:$H$5000, $F$6:$F$5000,">="&DATEVALUE("01-"&B6&"-"&A6), $F$6:$F$5000,"<="& EOMONTH(DATEVALUE("01-"&B6&"-"&A6),0))
 
Upvote 0

Forum statistics

Threads
1,215,077
Messages
6,122,992
Members
449,094
Latest member
masterms

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