Week number function

vmjan02

Well-known Member
Joined
Aug 15, 2012
Messages
1,114
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
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.

Week number calcu.xlsx
ABC
15-JanFormulaAcutal Output
21242-202542-2024
31143-202543-2024
41044-202544-2024
5945-202545-2024
6846-202546-2024
7747-202547-2024
8648-202548-2024
9549-202549-2024
10450-202550-2024
11351-202551-2024
12252-202552-2024
13153-202553-2024
141-20251-2025
Sheet1
Cell Formulas
RangeFormula
A2:A12A2=A3+1
B2:B13B2=WEEKNUM($A$1-7*A2)&"-"&TEXT($A$1,"YYYY")
B14B14=WEEKNUM(A1,2)&"-"&TEXT($A$1,"YYYY")
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Upvote 0
Solution

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top