I'm trying to replicate the table below. How can I sum the total orders for each week with duplicate date values as column headers? The data is dynamic and the column dates will change, so I was wondering if it's possible to sumif the table array using date and week as criteria?
Table:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Week[/TD]
[TD]Orders[/TD]
[/TR]
[TR]
[TD]4/20/17[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]4/27/17[/TD]
[TD]18[/TD]
[/TR]
[TR]
[TD]5/4/17[/TD]
[TD]12
[/TD]
[/TR]
</tbody>[/TABLE]
Data:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]Metric[/TD]
[TD]4/20/17[/TD]
[TD]4/20/17[/TD]
[TD]4/27/17[/TD]
[TD]4/27/17[/TD]
[TD]5/4/17[/TD]
[TD]5/4/17[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Sales[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Orders[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Sales[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Orders[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Sales[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Orders[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]2[/TD]
[/T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