Sum Product to combine year and month not separately

pedexe90

Board Regular
Joined
Apr 18, 2018
Messages
59
Hello everyone,

So I have another issue. I'm trying to use a sumproduct function to return sums based on year and month. But for some reason the function does not work. What I need the function to do is to combine both conditions for year and month and only return if both are met. For instance (as you can see per attached) the figures should not change from Oct 18 onward as I do not have any items in the column for post that period.

https://1drv.ms/x/s!AgQdYsSdg735gQMgDjJPDd0MYlWd


Many thanks
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Not sure this is right

in C3
=SUMPRODUCT((TEXT($AB$3:$AB$2000,"yymm")=TEXT(C$2,"yymm"))*($AA$3:$AA$2000))
and copy across the columns
 
Upvote 0
N.B. I did not view the info you referenced

You can consider the following approach.


Excel 2010
C
21-Oct-18
327
4
4a
Cell Formulas
RangeFormula
C3=SUMPRODUCT(--($AB$3:$AB$2000-DAY($AB$3:$AB$2000)+1=C2),($AA$3:$AA$2000))
 
Upvote 0
If you have the SUMIFS function in your Excel version it is more efficient than SUMPRODUCT. It would be something like
Code:
=SUMIFS($AA$3:$AA$2000,$AB$3:$AB$2000,"<="&C$2,$AB$3:$AB$2000,">"&C$2-DAY(C$2))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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