Simple SUMIFS problem

henryg

Board Regular
Joined
Oct 23, 2008
Messages
143
Office Version
  1. 365
Platform
  1. Windows
I have data in a worksheet (this is simplified) such as
Date (dd/mm/yy)Val
17/08/22148
18/08/22145
1/09/22151

and I want to sum the Val column by month without using a pivot table, so I try eg

=SUMIFS(b2:b4,a2:s4,MONTH(a2:a4)=8)

and it evaluates to zero; actually it spills zeros (I'm using 365) - I will want to spill the result by month but as that didn't work I tried what I though would be a simple version using a specific month (8). And as it spills I thought I'd sum the values as test a even though summing zeros gives a predictable zero.

I know I'm doing something stupid, but I just can't figure out what.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
How about
Excel Formula:
=SUMIFS(b2:b4,a2:a4,">="&DATE(2023,8,1),a2:a4,"<"&DATE(2023,9,1))
 
Upvote 0
I prefer the simplicity of the sumproduct solution, but thank you to both. Any pointers on where/why my SUMIFS fails?
 
Upvote 0
Your formula is using an array of TRUE/FALSE as the criteria for the dates in col A so will always return 0
 
Upvote 0
Ah, the light begins to dawn; even though by evaluating the formula I saw the array I didn't think it through. Hence the SUMPRODUCT. I see now. Thanks.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,528
Messages
6,120,065
Members
448,941
Latest member
AlphaRino

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