Week Name Based on Month

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
923
Office Version
  1. 365
Hi,

I have the following table:

DateWeek
3/1/2022​
Jan Week 1
12/1/2022​
Jan Week 2
5/2/2022​
Feb Week 1
4/3/2022​
Mar Week 1

I have the dates in the first column. In the second column, I am trying to name the week based on the date. For example 3/1/2022 is Jan Week 1.

Is it possible to do this with a formula ? Appreciate all the help.
 
Mon 28-Feb is "Feb week 5", Tue 1-Mar is "Mar week 1"
Is it correct? An Feb Week 5 have only 1 day?
 
Upvote 0

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Can I say the logic is:
Week starts from Mon-Sun
Any week with Monday fall into which month, then that week belongs to that month.
Is it correct?
Could you give more sample for week with days of 2 months?
 
Upvote 0
try

Book4.xlsm
AB
1dateweek num
231/12/2021Dec Week 5
31/01/2022Jan Week 1
42/01/2022Jan Week 1
53/01/2022Jan Week 2
64/01/2022Jan Week 2
731/01/2022Jan Week 6
81/02/2022Feb Week 1
925/02/2022Feb Week 4
1026/02/2022Feb Week 4
1127/02/2022Feb Week 4
1228/02/2022Feb Week 5
131/03/2022Mar Week 1
142/03/2022Mar Week 1
153/03/2022Mar Week 1
164/03/2022Mar Week 1
175/03/2022Mar Week 1
186/03/2022Mar Week 1
197/03/2022Mar Week 2
2031/03/2022Mar Week 5
211/04/2022Apr Week 1
222/04/2022Apr Week 1
233/04/2022Apr Week 1
244/04/2022Apr Week 2
255/04/2022Apr Week 2
Sheet5
Cell Formulas
RangeFormula
B2:B25B2=TEXT(A2,"mmm")&" Week "&QUOTIENT(TEXT(DAY(A2),"#")+(7-WEEKDAY(A2,2)),7)+1
 
Upvote 0
Solution
almost the same formula
Map1
ABCD
1dateBSALVfhqwgadsdelta
2za 01/01/2022jan week 1jan Week 10
3zo 02/01/2022jan week 1jan Week 10
4ma 03/01/2022jan week 2jan Week 20
5di 04/01/2022jan week 2jan Week 20
6wo 05/01/2022jan week 2jan Week 20
7do 06/01/2022jan week 2jan Week 20
8vr 07/01/2022jan week 2jan Week 20
9za 08/01/2022jan week 2jan Week 20
10zo 09/01/2022jan week 2jan Week 20
11ma 10/01/2022jan week 3jan Week 30
12di 11/01/2022jan week 3jan Week 30
13wo 12/01/2022jan week 3jan Week 30
14do 13/01/2022jan week 3jan Week 30
15vr 14/01/2022jan week 3jan Week 30
16za 15/01/2022jan week 3jan Week 30
17zo 16/01/2022jan week 3jan Week 30
18ma 17/01/2022jan week 4jan Week 40
19di 18/01/2022jan week 4jan Week 40
Blad1
Cell Formulas
RangeFormula
A2:A1001A2=SEQUENCE(1000,,DATE(2022,1,1))
B2:B19B2=TEXT(A2,"mmm")& " week " & CEILING((DAY(A2)-MOD(A2-2,7))/7,1)+1
C2:C19C2=TEXT(A2,"mmm")&" Week "&QUOTIENT(TEXT(DAY(A2),"#")+(7-WEEKDAY(A2,2)),7)+1
D2:D19D2=--(B2<>C2)
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A:AExpression=WEEKDAG(A1;2)=1textNO
 
Upvote 0
Hi fhqwgads/BSALV/bebo021999,

Thank you for your responses.

fhqwgads/BSALV

Thank you for your solution and it worked. Appreciate your valuable time and patience. Have a great day.
 
Upvote 0

Forum statistics

Threads
1,215,608
Messages
6,125,820
Members
449,265
Latest member
TomasTeix

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