Forum Discussion

ajpalm531's avatar
ajpalm531
Copper Contributor
Mar 15, 2022
Solved

SUM by Month formula not working

The formula I am having trouble with is as follows:
=SUMIFS($E$6:$E$266,$A$6:$A$266,">="&$A273,$A$6:$A$266,"<="&EOMONTH($A273,0))
It is to calculate the monthly totals of a sheet. The problem is it is ommitting values for the last day of the month even though I have the "<=" on the EOMONTH section

  • ajpalm531 

    Perhaps the values in A6:A266 include a time component. Try

    =SUMIFS($E$6:$E$266,$A$6:$A$266,">="&$A273,$A$6:$A$266,"<"&EOMONTH($A273,0)+1)

    If A273 is the first day of a month, you can also use

    =SUMIFS($E$6:$E$266,$A$6:$A$266,">="&$A273,$A$6:$A$266,"<"&EDATE($A273,1))

3 Replies

  • ajpalm531 

    Perhaps the values in A6:A266 include a time component. Try

    =SUMIFS($E$6:$E$266,$A$6:$A$266,">="&$A273,$A$6:$A$266,"<"&EOMONTH($A273,0)+1)

    If A273 is the first day of a month, you can also use

    =SUMIFS($E$6:$E$266,$A$6:$A$266,">="&$A273,$A$6:$A$266,"<"&EDATE($A273,1))

    • ajpalm531's avatar
      ajpalm531
      Copper Contributor
      Hello Hans Vogelaar,

      The "EDATE" change seems to have done the trick. It now adds all values including the last day of the month. Thanks
      • ajpalm531's avatar
        ajpalm531
        Copper Contributor
        Apologies the "<"&EDATE($A273,1)) was the correct solution. In another sheet with same attribute the edate solution added the first date of the following month. The first solution was correct. Thank you.

Resources