I am trying to get pervious 12 week from date, but my concern is if the year change the week and year don't work,
any way to fix it.
any way to fix it.
Week number calcu.xlsx | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | 5-Jan | Formula | Acutal Output | ||
2 | 12 | 42-2025 | 42-2024 | ||
3 | 11 | 43-2025 | 43-2024 | ||
4 | 10 | 44-2025 | 44-2024 | ||
5 | 9 | 45-2025 | 45-2024 | ||
6 | 8 | 46-2025 | 46-2024 | ||
7 | 7 | 47-2025 | 47-2024 | ||
8 | 6 | 48-2025 | 48-2024 | ||
9 | 5 | 49-2025 | 49-2024 | ||
10 | 4 | 50-2025 | 50-2024 | ||
11 | 3 | 51-2025 | 51-2024 | ||
12 | 2 | 52-2025 | 52-2024 | ||
13 | 1 | 53-2025 | 53-2024 | ||
14 | 1-2025 | 1-2025 | |||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
A2:A12 | A2 | =A3+1 |
B2:B13 | B2 | =WEEKNUM($A$1-7*A2)&"-"&TEXT($A$1,"YYYY") |
B14 | B14 | =WEEKNUM(A1,2)&"-"&TEXT($A$1,"YYYY") |