I have tried variations of index matches with if statements and SUMPRODUCT with multiple arrays all ending in errors. Can someone please help?
I need to SUM the Value Column in the Source Table by matching the COMPANY NAME, PURCH TYPE, AND CATEGORY. In the example below the correct results for Company A would be (from top to bottom)2, 0, 1 and for Company B 9, 9, 0. Any assistance would be greatly appreciated!
[TABLE="class: grid, width: 100, align: center"]
<tbody>[TR]
[TD][/TD]
[TD]Exact[/TD]
[TD]Exact[/TD]
[TD][/TD]
[TD]SOURCE TABLE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Company A[/TD]
[TD]Company B[/TD]
[TD][/TD]
[TD]CATEGORY[/TD]
[TD]PURCH TYPE[/TD]
[TD]VALUE[/TD]
[TD]COMPANY[/TD]
[/TR]
[TR]
[TD]category 1[/TD]
[TD](result)[/TD]
[TD](result)[/TD]
[TD][/TD]
[TD]Category 1[/TD]
[TD]Exact[/TD]
[TD]2[/TD]
[TD]Company A[/TD]
[/TR]
[TR]
[TD]category 2[/TD]
[TD](result)[/TD]
[TD](result)[/TD]
[TD][/TD]
[TD]Category 2[/TD]
[TD]Exact[/TD]
[TD]1[/TD]
[TD]Company B[/TD]
[/TR]
[TR]
[TD]category 3[/TD]
[TD](result)[/TD]
[TD](result)[/TD]
[TD][/TD]
[TD]Category 1[/TD]
[TD]Alt[/TD]
[TD]5[/TD]
[TD]Company A[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 3[/TD]
[TD]Alt[/TD]
[TD]2[/TD]
[TD]Company A[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 1[/TD]
[TD]Exact[/TD]
[TD]9[/TD]
[TD]Company B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 2[/TD]
[TD]Exact[/TD]
[TD]5[/TD]
[TD]Company B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 2[/TD]
[TD]Exact[/TD]
[TD]3[/TD]
[TD]Company B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 3[/TD]
[TD]Exact[/TD]
[TD]1[/TD]
[TD]Company A[/TD]
[/TR]
</tbody>[/TABLE]
I need to SUM the Value Column in the Source Table by matching the COMPANY NAME, PURCH TYPE, AND CATEGORY. In the example below the correct results for Company A would be (from top to bottom)2, 0, 1 and for Company B 9, 9, 0. Any assistance would be greatly appreciated!
[TABLE="class: grid, width: 100, align: center"]
<tbody>[TR]
[TD][/TD]
[TD]Exact[/TD]
[TD]Exact[/TD]
[TD][/TD]
[TD]SOURCE TABLE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Company A[/TD]
[TD]Company B[/TD]
[TD][/TD]
[TD]CATEGORY[/TD]
[TD]PURCH TYPE[/TD]
[TD]VALUE[/TD]
[TD]COMPANY[/TD]
[/TR]
[TR]
[TD]category 1[/TD]
[TD](result)[/TD]
[TD](result)[/TD]
[TD][/TD]
[TD]Category 1[/TD]
[TD]Exact[/TD]
[TD]2[/TD]
[TD]Company A[/TD]
[/TR]
[TR]
[TD]category 2[/TD]
[TD](result)[/TD]
[TD](result)[/TD]
[TD][/TD]
[TD]Category 2[/TD]
[TD]Exact[/TD]
[TD]1[/TD]
[TD]Company B[/TD]
[/TR]
[TR]
[TD]category 3[/TD]
[TD](result)[/TD]
[TD](result)[/TD]
[TD][/TD]
[TD]Category 1[/TD]
[TD]Alt[/TD]
[TD]5[/TD]
[TD]Company A[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 3[/TD]
[TD]Alt[/TD]
[TD]2[/TD]
[TD]Company A[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 1[/TD]
[TD]Exact[/TD]
[TD]9[/TD]
[TD]Company B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 2[/TD]
[TD]Exact[/TD]
[TD]5[/TD]
[TD]Company B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 2[/TD]
[TD]Exact[/TD]
[TD]3[/TD]
[TD]Company B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Category 3[/TD]
[TD]Exact[/TD]
[TD]1[/TD]
[TD]Company A[/TD]
[/TR]
</tbody>[/TABLE]