Sumproduct

elemexcel

New Member
Joined
Aug 31, 2018
Messages
7
Hello

I have a spreadsheet full of orders for Jan-18 to Sep-18. I am trying to extract data from it - I have managed to extract the most popular product per month using this formula -

{=IFERROR(INDEX('Sheet1'!$N$2:$N$10026,MODE(IF(MONTH('Sheet1'!$AB$2:$AB$10026)=(MONTH(Sheet2!BZ5))*(YEAR('Sheet1'!$AB$2:$AB$10026)=(YEAR(Sheet2!BZ5))),MATCH('Sheet1'!$N$2:$N$10026,'Sheet1'!$N$2:$N$10026,0)))),"")}

However, when I want to try and extract how many of each of the most popular products were sold every month, I can't seem to get it.

I have tried using SUMIF/S // COUNTIF/S but to no avail so tried using SUMPRODUCT and can't get it to work - can somebody point me in the right direction pls?

=SUMPRODUCT(--((MONTH('Sheet1'!$AB$2:$AB$10026)=(MONTH(Sheet2!BZ5))*(YEAR('Sheet1'!$AB$2:$AB$10026)=(YEAR(Sheet2!BZ5)),‘Sheet1'!$N$2:$N$1048576)=(Sheet2!$CA5))

Thanks so much
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
SUMPRODUCT needs identical ranges. =SUMPRODUCT(--(MONTH('Sheet1'!$AB$2:$AB$10026)=MONTH(Sheet2!BZ5)*YEAR('Sheet1'!$AB$2:$AB$10026)=YEAR(Sheet2!BZ5),‘Sheet1'!$N$2:$ N$10026=Sheet2!$CA5))
(Check the parenthesis I'm not quite sure)
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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