Sum of a range with specific date

kebabpete

New Member
Joined
Apr 12, 2012
Messages
11
Hi,

I'm currently using the following formula to give me a total number of units for a given month (Named data range=DATE_2012 & Month=July), based on the sum of total units for each user within a department (Archive)...

=SUMPRODUCT((UNITS_2012)*(MONTH(DATE_2012)=7)*(DEPARTMENT_2012="Archive"))

Does anyone know what I would use to find the total number of units for a given day of the year based on the same criteria? i.e. Sum for 'Archive' on specific date.

DAY seems to only refer to a day within a month, and not a day within a year;
DAY360 seems to only return a day between 2 given dates;
DATE seems to return the MS date/time code but I can't see how to get this into the formula.

Any ideas?

Thanks.
 
Hi,

I'm currently using the following formula to give me a total number of units for a given month (Named data range=DATE_2012 & Month=July), based on the sum of total units for each user within a department (Archive)...

=SUMPRODUCT((UNITS_2012)*(MONTH(DATE_2012)=7)*(DEPARTMENT_2012="Archive"))

Does anyone know what I would use to find the total number of units for a given day of the year based on the same criteria? i.e. Sum for 'Archive' on specific date.

DAY seems to only refer to a day within a month, and not a day within a year;
DAY360 seems to only return a day between 2 given dates;
DATE seems to return the MS date/time code but I can't see how to get this into the formula.

Any ideas?

Thanks.
Maybe something like this...

A1 = some date
B1 = Archive

=SUMPRODUCT(UNITS_2012,--(DATE_2012=A1),--(DEPARTMENT_2012=B1))
 
Last edited:
Upvote 0
Maybe something like this...

A1 = some date
B1 = Archive

=SUMPRODUCT(UNITS_2012,--(DATE_2012=A1),--(DEPARTMENT_2012=B1))
If you're using Excel 2007 or later you can use the SUMIFS function:

=SUMIFS(UNITS_2012,DATE_2012,A1,DEPARTMENT_2012,B1)
 
Upvote 0

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