SUMPRODUCT to also MATCH date

ddub25

Well-known Member
Joined
Jan 11, 2007
Messages
625
Office Version
  1. 2019
Platform
  1. Windows
=SUMPRODUCT(--('Rec. Shared'!$M$12:$M$848=$A$47),'Rec. Shared'!$AE$12:$AE$848)

This formula looks at $A$47 for a text value ('Andy M' is displayed) and then looks in the range 'Rec. Shared'!$M$12:$M$848 to see if it can find a MATCH. If it does it then SUMS the corresponding rows in 'Rec. Shared'!$AE$12:$AE$848.

I'd like to adapt this formula further to look at the month/year displayed in A52, and find dates in 'Rec. Shared'!$AI$12:$AI$848 that fall within this month/year and only SUM these values as well as retaining the current formula conditions which must still be met.

The date format in A52 is mmm-yy (Sep-10)
The date format in 'Rec. Shared'!$AI$12:$AI$848 is '14/03/01' (Excel 2007, I believe).

Can anyone help?

Dan
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try:
=SUMPRODUCT(('Rec. Shared'!$M$12:$M$848=$A$47)*(YEAR('Rec. Shared'!$AI$12:$AI$848)=YEAR($A$52))*(MONTH('Rec. Shared'!$AI$12:$AI$848)=MONTH($A$52)),'Rec. Shared'!$AE$12:$AE$848)

should work as long as dates are excel dates, regardless of how they're formatted.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,225
Members
452,896
Latest member
IGT

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