Week number function

vmjan02

Well-known Member
Joined
Aug 15, 2012
Messages
1,132
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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Upvote 0
Solution

Forum statistics

Threads
1,223,943
Messages
6,175,546
Members
452,652
Latest member
eduedu

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