heretolearnexcel
Board Regular
- Joined
- Jan 22, 2019
- Messages
- 61
- Office Version
- 365
- Platform
- Windows
I want total sales for each sku in a specific date range. But what I get is daily sales excluding the daily sales that are not in the date range. So I then group the daily sales into years, so that I only get the total yearly sales for each item, and I get this.
<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"]20[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"]35[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"]15[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"][/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"][/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"][/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]2019[/TD]
[TD="align: right"]5[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"][/TD]
[TD="align: right"]23[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"][/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"][/TD]
[TD="align: right"]15[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"][/TD]
[TD="align: right"]19[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"][/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"][/TD]
[TD="align: right"]249[/TD]
</tbody>
But this way I will still have to sum the total sales in 2018 and 2019 for each sku. What I want is to get total sales in the date range, not broken down in years or whatever. Like this:
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]15[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]29[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]48[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]33[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]27[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]27[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"]32[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]18[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"]20[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]254[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"]23[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"]15[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"]19[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"]619[/TD]
</tbody>
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P5[/TH]
[TD="align: left"]=L5+L14[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P6[/TH]
[TD="align: left"]=L6+L15[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P7[/TH]
[TD="align: left"]=L7+L16[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P8[/TH]
[TD="align: left"]=L8+L17[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P9[/TH]
[TD="align: left"]=L9+L18[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P10[/TH]
[TD="align: left"]=L10+L19[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P11[/TH]
[TD="align: left"]=L11+L20[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P12[/TH]
[TD="align: left"]=L12+L21[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P13[/TH]
[TD="align: left"]=L13+L22[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P14[/TH]
[TD="align: left"]=L14+L23[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P15[/TH]
[TD="align: left"]=L15+L24[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P16[/TH]
[TD="align: left"]=L16+L25[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P17[/TH]
[TD="align: left"]=L17+L26[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P18[/TH]
[TD="align: left"]=L18+L27[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P19[/TH]
[TD="align: left"]=L19+L28[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P20[/TH]
[TD="align: left"]=L20+L29[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P21[/TH]
[TD="align: left"]=L21+L30[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P22[/TH]
[TD="align: left"]=L22+L31[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P23[/TH]
[TD="align: left"]=SUM(P5:P22)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
How can I achieve this?
Note: the grand totals are irrelevant because I don't want the total sales of all the items, only the total sales of each item.
J | K | L | |
---|---|---|---|
DATE | SKU | SALES | |
A | |||
B | |||
C | |||
D | |||
E | |||
F | |||
G | |||
H | |||
I | |||
A | |||
B | |||
C | |||
D | |||
E | |||
F | |||
G | |||
H | |||
I | |||
Grand Total |
<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]2018[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"]20[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"]35[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"]15[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"][/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"][/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"][/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]2019[/TD]
[TD="align: right"]5[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"][/TD]
[TD="align: right"]23[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"][/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"][/TD]
[TD="align: right"]15[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"][/TD]
[TD="align: right"]19[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"][/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"][/TD]
[TD="align: right"]249[/TD]
</tbody>
Tabla Dinámica
But this way I will still have to sum the total sales in 2018 and 2019 for each sku. What I want is to get total sales in the date range, not broken down in years or whatever. Like this:
O | P | |
---|---|---|
SKU | SALES | |
A | ||
B | ||
C | ||
D | ||
E | ||
F | ||
G | ||
H | ||
I | ||
A | ||
B | ||
C | ||
D | ||
E | ||
F | ||
G | ||
H | ||
I | ||
Grand Total |
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]15[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]29[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]48[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]33[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]27[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]27[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"]32[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]18[/TD]
[TD="align: center"]13[/TD]
[TD="align: right"]20[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]254[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"]23[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"]15[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"]19[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"]12[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"]13[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"]619[/TD]
</tbody>
Tabla Dinámica
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P5[/TH]
[TD="align: left"]=L5+L14[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P6[/TH]
[TD="align: left"]=L6+L15[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P7[/TH]
[TD="align: left"]=L7+L16[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P8[/TH]
[TD="align: left"]=L8+L17[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P9[/TH]
[TD="align: left"]=L9+L18[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P10[/TH]
[TD="align: left"]=L10+L19[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P11[/TH]
[TD="align: left"]=L11+L20[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P12[/TH]
[TD="align: left"]=L12+L21[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P13[/TH]
[TD="align: left"]=L13+L22[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P14[/TH]
[TD="align: left"]=L14+L23[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P15[/TH]
[TD="align: left"]=L15+L24[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P16[/TH]
[TD="align: left"]=L16+L25[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P17[/TH]
[TD="align: left"]=L17+L26[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P18[/TH]
[TD="align: left"]=L18+L27[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P19[/TH]
[TD="align: left"]=L19+L28[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P20[/TH]
[TD="align: left"]=L20+L29[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P21[/TH]
[TD="align: left"]=L21+L30[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P22[/TH]
[TD="align: left"]=L22+L31[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]P23[/TH]
[TD="align: left"]=SUM(P5:P22)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
How can I achieve this?
Note: the grand totals are irrelevant because I don't want the total sales of all the items, only the total sales of each item.