SUM IF DATE IN IN THAT MONTH

superstarr

Board Regular
Joined
Jul 10, 2003
Messages
54
hi
need a little hlp pls
have a range of dates, ie 3/11/2004
would like to have the sum of all the dates by month
tried the sumif, but cant figure out how to tell formula that 3/11/2004 is in march so add to the march total

thx much

JOn
 
Hi,

Sorry to reopen, what seems to be a closed topic, but i have hit a snag with this solution.

It has worked perfectly for all of the months, other than january, which is giving a total of all of the months combined. (i assume its, seeing the 1 as true)

Any ideas how to resolve this please?

Control+shift+enter, not just enter:

=SUM(IF(ISNUMBER($A$2:$A$6),IF($A$2:$A$6-DAY($A$2:$A$6)+1=$E2-DAY($E2)+1,$B$2:$B$6)))
 
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Control+shift+enter, not just enter:

=SUM(IF(ISNUMBER($A$2:$A$6),IF($A$2:$A$6-DAY($A$2:$A$6)+1=$E2-DAY($E2)+1,$B$2:$B$6)))

I adjusted the above to suit my spreadsheet but unfortunately, it didnt work.

i current have (using ctrl+shift+enter)

=SUM(IF(MONTH($K$2:$K$201)=1,$H$2:$H$201,0))

as i said, works for ever month apart from this (jan)


<tbody>
</tbody>
 
Upvote 0
I adjusted the above to suit my spreadsheet but unfortunately, it didnt work.

i current have (using ctrl+shift+enter)

=SUM(IF(MONTH($K$2:$K$201)=1,$H$2:$H$201,0))

as i said, works for ever month apart from this (jan)

<tbody>
</tbody>

Are you not concerned about the year? Is it 2014, 2015, or what?
 
Upvote 0
I adjusted the above to suit my spreadsheet but unfortunately, it didnt work.

i current have (using ctrl+shift+enter)

=SUM(IF(MONTH($K$2:$K$201)=1,$H$2:$H$201,0))

as i said, works for ever month apart from this (jan)

<tbody>
</tbody>

Are you not concerned about the year? Is it 2014, 2015, or what?

no the year doesnt matter, as there will be a new sheet each year.

Control+shift+enter, not just enter:

=SUM(IF(ISNUMBER($K$2:$K$201),IF(MONTH($K$2:$K$201)=1,$H$2:$H$20)))
 
Upvote 0
This has been a helpful thread. Thank you. An added level of complexity (another if statement) and it seems to break the array. Any ideas whats wrong with my statement? See screenshot below for some sample data.

{=IF($C$3:$C$2000="bella",SUM(IF(MONTH($A$3:$A$2000)=7,$B$3:$B$2000)),0)}

<colgroup><col width="87" style="width:65pt"> </colgroup><tbody>
<!--StartFragment-->
<!--EndFragment-->
</tbody>

<attachment></attachment>
 
Upvote 0
dateamountemployee
22-Jul-16$28.81bob
1-Jul-16$151.20bob
14-Jul-16$8.00vance
13-Jul-16$21.90vance
14-Jul-16$302.00bob
25-Jul-16$15.00bob
14-Jul-16$9.00bella
13-Jul-16$8.80bella
4-Jul-16$30.40bella
14-Jul-16$5.98vance
19-Jul-16$60.00vance
4-Jul-16$24.90vance

<!--StartFragment--> <colgroup><col width="87" span="2" style="width:65pt"> <col width="87" style="width:65pt"> </colgroup><tbody>
<!--EndFragment--></tbody>
 
Upvote 0
@brbell01

1. If a year test is not needed: Control+shift+enter, not just enter...

=SUM(IF(MONTH($A$3:$A$2000)=7,IF($C$3:$C$2000="bella",$B$3:$B$2000)))

2. If you have the SUMIFS function on your system: Just enter...

=SUMIFS(B:B,C:C,"bella",A:A,">="&DATE(2016,7,1),A:A,"<="&DATE(2016,7,31))
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,321
Members
449,218
Latest member
Excel Master

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