SUMIF calculations with multiple criteria aren't working

FMM

New Member
Joined
Jun 6, 2022
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hi All

I just can't get my SUMIF to work here. Perhaps someone can see the error? I would like to sum the totals of actual spends across months but those 'months' don't fall completely inside the calendar month (it's the financial year whereby months have 4 or 5 weeks in them), so I need to do a lookup of some sort as week to determine what date falls within what month.

It works if I only use one criterion, that is the values are taken from the "Forecast Costs" cells but that adds up all of the values. As soon as I try to put in the month criteria, I get $0.00.

Please see attached. I want to sum totals if they fall under "Forecasted Costs" and by Month in the Budget Tracking tab onto the Dashboard tab - the month is to match 'Dashboard'!J4 and below.

Dashboard tab:
Budget Tracker example.xlsx
IJK
2Current Approved Budget:$500,000.00
3MonthForecast CostsActual Costs
4Jun-22$0.00
5Jul-22$0.00
6Aug-22$0.00
7Sep-22
8Oct-22
9Nov-22
10Dec-22
11Jan-23
12Feb-23
13Mar-23
14Apr-23
15May-23
16Jun-23
17Total$0.00$0.00
Dashboard
Cell Formulas
RangeFormula
J4:J6J4=SUMIFS('Budget Tracking'!$O$9:$XFD$9,'Budget Tracking'!$O$8:$XFD$8, "Forecast Costs",'Budget Tracking'!$O$5:$XFD$5, Dashboard!I4)
J17:K17J17=SUM(J5:J16)


Budget tracking tab:
Budget Tracker example.xlsx
OPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKAL
5Financial Month:Jun-22Jun-22Jul-22Jul-22Aug-22Aug-22
6SprintWork Days in SprintSprint Start DateSprintWork Days in SprintStart DateSprintWork Days in SprintStart DateSprintWork Days in SprintStart DateSprintWork Days in SprintStart DateSprintWork Days in SprintStart Date
7010Tue 07-Jun-22110Tue 21-Jun-22210Tue 05-Jul-22310Tue 19-Jul-2249Tue 02-Aug-22510Tue 16-Aug-22
8Forecast Days/UnitsForecast CostsActual CostsForecast Days/UnitsForecast CostsActual CostsForecast Days/UnitsForecast CostsActual CostsForecast Days/UnitsForecast CostsActual CostsForecast Days/UnitsForecast CostsActual CostsForecast Days/UnitsForecast CostsActual Costs
9242#REF!$ 111242$ -$ 1112$ -$ 111242$ -$ 111216$ -$ 111240$ -$ 111
Budget Tracking
Cell Formulas
RangeFormula
R5,AL5,AH5,AD5,Z5,V5R5=LOOKUP(Q7,MonthEndDates[Start Date],MonthEndDates[Month])
P7,AJ7,AF7,AB7,X7,T7P7=IF(Q$7="","",NETWORKDAYS(Q$7,(Q$7+13),Holidays[Date]))
Q7Q7=IF($C$7="","",$C$7)
S7,AI7,AE7,AA7,W7S7=O7+1
U7,AK7,AG7,AC7,Y7U7=Q7+14
AJ9:AK9,AF9:AG9,AB9:AC9,X9:Y9,T9:U9,P9:Q9P9=SUM(P13:P1010)
R9,AL9,AH9,AD9,Z9,V9R9=SUM(R11:R1010)


Lists tab:
Budget Tracker example.xlsx
GHIJ
1MONTH END DATES
2Start DateEnd DateMonthNo. of weeks
329/03/20221/05/2022Apr-224
42/05/202229/05/2022May-224
530/05/20223/07/2022Jun-225
64/07/202231/07/2022Jul-224
71/08/202228/08/2022Aug-224
829/08/20222/10/2022Sep-225
93/10/202230/10/2022Oct-224
1031/10/202227/11/2022Nov-224
1128/11/20221/01/2023Dec-225
122/01/202329/01/2023Jan-234
1330/01/202326/02/2023Feb-234
1427/02/20232/04/2023Mar-235
153/04/202330/04/2023Apr-234
161/05/202328/05/2023May-234
1729/05/20232/07/2023Jun-235
Lists
Cell Formulas
RangeFormula
G4:G17G4=H3+1
 

Attachments

  • Budget Tracking.jpg
    Budget Tracking.jpg
    57.8 KB · Views: 8
  • Dashboard.jpg
    Dashboard.jpg
    46.8 KB · Views: 9
  • Lists.jpg
    Lists.jpg
    40.5 KB · Views: 8

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
The issue is that the two criteria need to be met in the same column in order for the value in that same column to be included in the sum. The date criteria are in columns R, V, Z, etc. while the "Forecast Costs" headings criteria are in columns Q, U, Y, etc. Here I've changed the formula to refer to dates in row 4 and copied the Financial Month values into both columns involved in the Forecast Costs and Actual Costs (see yellow cells)...and then populated the table with some values to demonstrate.
Book1
OPQRSTUVW
46/1/20226/1/20226/1/20226/1/2022
5Financial Month:6/1/20226/1/2022
6SprintWork Days in SprintSprint Start DateSprintWork Days in SprintStart DateSprint
7010Tuesday, June 7, 2022110Tuesday, June 21, 20222
8Forecast Days/UnitsForecast CostsActual CostsForecast Days/UnitsForecast CostsActual Costs
901326014115
10
1114
1225
13433466
144447
154548
16
Budget Tracking
Cell Formulas
RangeFormula
Q4,U4Q4=R5
R4,V4R4=R5
R5,V5R5=LOOKUP(Q7,MonthEndDates[Start Date],MonthEndDates[Month])
P7,T7P7=IF(Q$7="","",NETWORKDAYS(Q$7,(Q$7+13),Holidays[Date]))
Q7Q7=IF($C$7="","",$C$7)
S7,W7S7=O7+1
U7U7=Q7+14
P9:Q9,T9:U9P9=SUM(P13:P1010)
R9,V9R9=SUM(R11:R1010)

Book1
IJK
1
2Current Approved Budget:500000
3MonthForecast CostsActual Costs
4Jun-2227321
5Jul-2221657
6Aug-22693
7Sep-22
Dashboard
Cell Formulas
RangeFormula
J4:J6J4=SUMIFS('Budget Tracking'!$O$9:$XFD$9,'Budget Tracking'!$O$8:$XFD$8, "Forecast Costs",'Budget Tracking'!$O$4:$XFD$4, Dashboard!$I4)
K4:K6K4=SUMIFS('Budget Tracking'!$O$9:$XFD$9,'Budget Tracking'!$O$8:$XFD$8, "Actual Costs",'Budget Tracking'!$O$4:$XFD$4, Dashboard!$I4)
 
Upvote 0
Solution
The issue is that the two criteria need to be met in the same column in order for the value in that same column to be included in the sum. The date criteria are in columns R, V, Z, etc. while the "Forecast Costs" headings criteria are in columns Q, U, Y, etc. Here I've changed the formula to refer to dates in row 4 and copied the Financial Month values into both columns involved in the Forecast Costs and Actual Costs (see yellow cells)...and then populated the table with some values to demonstrate.
Book1
OPQRSTUVW
46/1/20226/1/20226/1/20226/1/2022
5Financial Month:6/1/20226/1/2022
6SprintWork Days in SprintSprint Start DateSprintWork Days in SprintStart DateSprint
7010Tuesday, June 7, 2022110Tuesday, June 21, 20222
8Forecast Days/UnitsForecast CostsActual CostsForecast Days/UnitsForecast CostsActual Costs
901326014115
10
1114
1225
13433466
144447
154548
16
Budget Tracking
Cell Formulas
RangeFormula
Q4,U4Q4=R5
R4,V4R4=R5
R5,V5R5=LOOKUP(Q7,MonthEndDates[Start Date],MonthEndDates[Month])
P7,T7P7=IF(Q$7="","",NETWORKDAYS(Q$7,(Q$7+13),Holidays[Date]))
Q7Q7=IF($C$7="","",$C$7)
S7,W7S7=O7+1
U7U7=Q7+14
P9:Q9,T9:U9P9=SUM(P13:P1010)
R9,V9R9=SUM(R11:R1010)

Book1
IJK
1
2Current Approved Budget:500000
3MonthForecast CostsActual Costs
4Jun-2227321
5Jul-2221657
6Aug-22693
7Sep-22
Dashboard
Cell Formulas
RangeFormula
J4:J6J4=SUMIFS('Budget Tracking'!$O$9:$XFD$9,'Budget Tracking'!$O$8:$XFD$8, "Forecast Costs",'Budget Tracking'!$O$4:$XFD$4, Dashboard!$I4)
K4:K6K4=SUMIFS('Budget Tracking'!$O$9:$XFD$9,'Budget Tracking'!$O$8:$XFD$8, "Actual Costs",'Budget Tracking'!$O$4:$XFD$4, Dashboard!$I4)
Thank you so, so much, Kirk. This has been wracking my brain!! Just a small thing that I didn't know.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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