Hi,
I have a query related to SUMPRODUCT with multiple criteria in Rows and Columns.
Using the below example to explain the problem.
I have data of sales figures of various products belonging to different categories for different quarters over a few years. Am trying to calculate the total Value for each category for a full year.
[TABLE="width: 725"]
<colgroup><col span="2"><col><col span="8"></colgroup><tbody>[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]2017[/TD]
[TD]2017[/TD]
[TD]2017[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[TD]2018[/TD]
[TD]2018[/TD]
[TD]2018[/TD]
[/TR]
[TR]
[TD]Product[/TD]
[TD]Category[/TD]
[TD]Unit value ($)[/TD]
[TD]Q1[/TD]
[TD]Q2[/TD]
[TD]Q3[/TD]
[TD]Q4[/TD]
[TD]Q1[/TD]
[TD]Q2[/TD]
[TD]Q3[/TD]
[TD]Q4[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Regular[/TD]
[TD]4[/TD]
[TD]57[/TD]
[TD]29[/TD]
[TD]42[/TD]
[TD]31[/TD]
[TD]80[/TD]
[TD]39[/TD]
[TD]38[/TD]
[TD]43[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Regular[/TD]
[TD]5[/TD]
[TD]29[/TD]
[TD]55[/TD]
[TD]50[/TD]
[TD]67[/TD]
[TD]26[/TD]
[TD]80[/TD]
[TD]70[/TD]
[TD]31[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Super[/TD]
[TD]8[/TD]
[TD]40[/TD]
[TD]57[/TD]
[TD]66[/TD]
[TD]80[/TD]
[TD]77[/TD]
[TD]62[/TD]
[TD]57[/TD]
[TD]70[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Super[/TD]
[TD]9[/TD]
[TD]65[/TD]
[TD]51[/TD]
[TD]38[/TD]
[TD]48[/TD]
[TD]55[/TD]
[TD]36[/TD]
[TD]77[/TD]
[TD]79[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]Super[/TD]
[TD]7[/TD]
[TD]76[/TD]
[TD]61[/TD]
[TD]39[/TD]
[TD]41[/TD]
[TD]57[/TD]
[TD]45[/TD]
[TD]68[/TD]
[TD]58[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]Regular[/TD]
[TD]6[/TD]
[TD]25[/TD]
[TD]77[/TD]
[TD]31[/TD]
[TD]53[/TD]
[TD]38[/TD]
[TD]35[/TD]
[TD]74[/TD]
[TD]25[/TD]
[/TR]
</tbody>[/TABLE]
I want to get the result without using any helper columns (adding full year numbers in helper columns).
Required result in below format
[TABLE="width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Category[/TD]
[TD="class: xl66, width: 64"]2017[/TD]
[TD="class: xl66, width: 64"]2018[/TD]
[/TR]
[TR]
[TD="class: xl66"]Regular[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]Super[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
</tbody>[/TABLE]
Thanks for your help
I have a query related to SUMPRODUCT with multiple criteria in Rows and Columns.
Using the below example to explain the problem.
I have data of sales figures of various products belonging to different categories for different quarters over a few years. Am trying to calculate the total Value for each category for a full year.
[TABLE="width: 725"]
<colgroup><col span="2"><col><col span="8"></colgroup><tbody>[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]2017[/TD]
[TD]2017[/TD]
[TD]2017[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[TD]2018[/TD]
[TD]2018[/TD]
[TD]2018[/TD]
[/TR]
[TR]
[TD]Product[/TD]
[TD]Category[/TD]
[TD]Unit value ($)[/TD]
[TD]Q1[/TD]
[TD]Q2[/TD]
[TD]Q3[/TD]
[TD]Q4[/TD]
[TD]Q1[/TD]
[TD]Q2[/TD]
[TD]Q3[/TD]
[TD]Q4[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Regular[/TD]
[TD]4[/TD]
[TD]57[/TD]
[TD]29[/TD]
[TD]42[/TD]
[TD]31[/TD]
[TD]80[/TD]
[TD]39[/TD]
[TD]38[/TD]
[TD]43[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Regular[/TD]
[TD]5[/TD]
[TD]29[/TD]
[TD]55[/TD]
[TD]50[/TD]
[TD]67[/TD]
[TD]26[/TD]
[TD]80[/TD]
[TD]70[/TD]
[TD]31[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Super[/TD]
[TD]8[/TD]
[TD]40[/TD]
[TD]57[/TD]
[TD]66[/TD]
[TD]80[/TD]
[TD]77[/TD]
[TD]62[/TD]
[TD]57[/TD]
[TD]70[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Super[/TD]
[TD]9[/TD]
[TD]65[/TD]
[TD]51[/TD]
[TD]38[/TD]
[TD]48[/TD]
[TD]55[/TD]
[TD]36[/TD]
[TD]77[/TD]
[TD]79[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]Super[/TD]
[TD]7[/TD]
[TD]76[/TD]
[TD]61[/TD]
[TD]39[/TD]
[TD]41[/TD]
[TD]57[/TD]
[TD]45[/TD]
[TD]68[/TD]
[TD]58[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]Regular[/TD]
[TD]6[/TD]
[TD]25[/TD]
[TD]77[/TD]
[TD]31[/TD]
[TD]53[/TD]
[TD]38[/TD]
[TD]35[/TD]
[TD]74[/TD]
[TD]25[/TD]
[/TR]
</tbody>[/TABLE]
I want to get the result without using any helper columns (adding full year numbers in helper columns).
Required result in below format
[TABLE="width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Category[/TD]
[TD="class: xl66, width: 64"]2017[/TD]
[TD="class: xl66, width: 64"]2018[/TD]
[/TR]
[TR]
[TD="class: xl66"]Regular[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]Super[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
</tbody>[/TABLE]
Thanks for your help