Sumproduct with date criteria

Akbarov

Active Member
Joined
Jun 30, 2018
Messages
347
Office Version
  1. 365
Platform
  1. Windows
Hello dear community,


I use following formula to get results from yearly selling list. =SUMPRODUCT(--(EXACT(C2,'XM'!$F$4:$F$1051)),'XM'!$P$4:$P$1051)

I need to add there one more criteria, to get monthly results. How can i use formula to give me results for all days of 01.2020 and 02.2020 etc..


30.01.2020
30.01.2020
31.01.2020
31.01.2020
31.01.2020
31.01.2020
31.01.2020
03.02.2020
03.02.2020
03.02.2020
03.02.2020
03.02.2020
03.02.2020
03.02.2020
04.02.2020
04.02.2020
04.02.2020
04.02.2020
05.02.2020
05.02.2020
05.02.2020
05.02.2020
05.02.2020
05.02.2020
05.02.2020
06.02.2020
06.02.2020
06.02.2020
07.02.2020
07.02.2020
07.02.2020
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
You don't say where your dates are, change the ? to the relevant Col

=SUMPRODUCT(--(EXACT(C2,'XM'!$F$4:$F$1051)*(TEXT('XM'!$?$4:$?$1051,"mmmyyyy")="Jan2020")),'XM'!$P$4:$P$1051)

You can put the "Jan2020" in a cell, say A1 as 1/1/2020, then reference the cell as TEXT(A1,"mmmyyyy"), so
=SUMPRODUCT(--(EXACT(C2,'XM'!$F$4:$F$1051)*(TEXT('XM'!$?$4:$?$1051,"mmmyyyy")=TEXT($A$1,"mmmyyyy")),'XM'!$P$4:$P$1051)
 
Upvote 0
Did you resolve it? Looks like I missed a )

=SUMPRODUCT(--(EXACT(C2,'XM'!$F$4:$F$1051)*(TEXT('XM'!$?$4:$?$1051,"mmmyyyy")=TEXT($A$1,"mmmyyyy"))),'XM'!$P$4:$P$1051)
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,269
Members
449,075
Latest member
staticfluids

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