Formula to get month from week number

NikToo

Board Regular
Joined
Sep 24, 2015
Messages
66
Office Version
  1. 365
This is causing me too much grief as hen I try one thing it fixes it in one place and breaks it in another.

I need the month number based on the week number, running from Sunday to Saturday, starting on the first Sunday of the year. So in 2020 it was January 5th which should start as week 1, in 2021 it's January 3rd.

At the moment this works for 2021 but not 2020:

Excel Formula:
=TEXT((MONTH(DATE(A2,1,B2*7-4)))*29,"mmm")

Year is in A2, week number in B2. I can't figure out what the formula does so I'm just trying different numbers, which isn't ideal.

Is there one formula which could sort out both years in one go?
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
See if the following formula works for you:
Excel Formula:
=TEXT(WORKDAY.INTL(DATE(A2,1,0),B2,"1111110"),"mmm")
 
Upvote 0
It does, thanks. Apart from week 53 in 2020 which comes up as January... I'll have to fudge that one manually.

What does the formula do?
 
Upvote 0
The formula looks for the n-th Sunday of the year and returns its month.

For year 2020, the 53rd Sunday is January 3, 2021, so the formula returns "Jan".
 
Upvote 0
It does, thanks. Apart from week 53 in 2020 which comes up as January...
What would you consider to be the correct result when the specified week is split over 2 months?
 
Upvote 0

Forum statistics

Threads
1,214,634
Messages
6,120,659
Members
448,975
Latest member
sweeberry

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