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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,653
Messages
6,120,749
Members
448,989
Latest member
mariah3

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