Hi All,
I recently I want to sum the value based on month and year criteria. However the sum of each month in year 2021 should the result only base on the year to date of 2022.
As you can see the current date is Oct-2022, and the result in 2021 from Oct to Dec (in Orange hightlight) will not be showed if there is no update for Oct until Dec 2022.
I recently I want to sum the value based on month and year criteria. However the sum of each month in year 2021 should the result only base on the year to date of 2022.
As you can see the current date is Oct-2022, and the result in 2021 from Oct to Dec (in Orange hightlight) will not be showed if there is no update for Oct until Dec 2022.
Book1 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | |||
1 | Current Date: | Oct-22 | ||||||||||||||||||||
2 | Sales History | |||||||||||||||||||||
3 | Year | Month | Total | Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Total | |||||
4 | 2021 | Jan | 100 | 2022 | 90 | 150 | 120 | 90 | 30 | 80 | 100 | 90 | 110 | 0 | 0 | 0 | 860 | |||||
5 | 2021 | Feb | 50 | 2021 | 100 | 50 | 80 | 80 | 100 | 90 | 110 | 100 | 120 | 830 | ||||||||
6 | 2021 | Mar | 80 | |||||||||||||||||||
7 | 2021 | Apr | 80 | |||||||||||||||||||
8 | 2021 | May | 100 | |||||||||||||||||||
9 | 2021 | Jun | 90 | |||||||||||||||||||
10 | 2021 | Jul | 110 | |||||||||||||||||||
11 | 2021 | Aug | 100 | |||||||||||||||||||
12 | 2021 | Sep | 120 | |||||||||||||||||||
13 | 2021 | Oct | 70 | |||||||||||||||||||
14 | 2021 | Nov | 150 | |||||||||||||||||||
15 | 2021 | Dec | 200 | |||||||||||||||||||
16 | 2022 | Jan | 90 | |||||||||||||||||||
17 | 2022 | Feb | 150 | |||||||||||||||||||
18 | 2022 | Mar | 120 | |||||||||||||||||||
19 | 2022 | Apr | 90 | |||||||||||||||||||
20 | 2022 | May | 30 | |||||||||||||||||||
21 | 2022 | Jun | 80 | |||||||||||||||||||
22 | 2022 | Jul | 100 | |||||||||||||||||||
23 | 2022 | Aug | 90 | |||||||||||||||||||
24 | 2022 | Sep | 110 | |||||||||||||||||||
25 | 2022 | Oct | ||||||||||||||||||||
26 | 2022 | Nov | ||||||||||||||||||||
27 | 2022 | Dec | ||||||||||||||||||||
28 | ||||||||||||||||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G4:R4 | G4 | =IFERROR(SUMIFS($C$4:$C$27,$A$4:$A$27,$F$4,$B$4:$B$27,G$3),"") |
S4:S5 | S4 | =SUM(G4:R4) |