1
votes

My question is directly related to Excel Formula to SUMIF date falls in particular month, but I can't get my formula to work based on the answers there.

My very simple worksheet looks like this:

MONTH        INCOME 
January      {formula goes here and in subsequent rows}
February    
March       
April       
May     
{&c. for all 12 months}

I'm trying to get a sum of values in column E from another sheet, called "Worklog", calculating the income total per month.

The “Worklog” sheet is formatted like so:

(A)         (B)             (C)             (D)         (E)
DATE        EMPLOYER        DESCRIPTION     AMNT DUE    AMNT REC'D
01/01/17    Employer Name   Project Name    $100         $100 
02/09/17    Employer Name   Project Name    $100         $300 
03/11/17    Employer Name   Project Name    $100         $100 
04/12/17    Employer Name   Project Name    $100         $100 
07/16/17    Employer Name   Project Name    $200         $200 

I've tried the following, all as array formulas (by entering the formula and hitting Control-Shift-Enter as instructed in the other post):

=SUMPRODUCT( (MONTH(Worklog!$A$2:$A$250)=MONTH(A2)) * (Worklog!$E$2:$E$250) 

and

=SUM(IF(MONTH(Worklog!$A$2:$A$250)=MONTH(A2),Worklog!$E$2:$E$250,0))
=SUM(IF(MONTH(Worklog!$A$2:$A$250)=1,Worklog!$E$2:$E$250,0))

and

=SUMPRODUCT( (MONTH(Worklog!$A$2:$A$250)=1) * (Worklog!$E$2:$E$250) )

Although the Date columns are formatted differently (“mmmm” vs “dd/mm/yy”), they are both Date type columns. The Worklog does contain data for all twelve months.

Where am I going wrong?

I’m running Microsoft Excel for Mac (Version 15.33), in case that makes any difference in how the formulas are written.

Thanks in advance for your help!

1

1 Answers

2
votes

Use SUMIFS()

=SUMIFS(Worklog!$E:$E,Worklog!$A:$A,">=" & EOMONTH(A2,-1)+1,Worklog!$A:$A,"<" & EOMONTH(A2,0)+1)

enter image description here