Reversed weeknumber function?

Jaymond Flurrie

Well-known Member
Joined
Sep 22, 2008
Messages
919
Office Version
  1. 365
Platform
  1. Windows
I have like this:
Source Date: December 31st, 2020
Result: 53/2020
Formula: WEEKNUM(A1;21)&"/"&YEAR(A1)

But how about the same backwards, what would you suggest? The exact date would preferably be the particular Monday.

So input: 53/2020 (which can be parsed obviously to 53 and 2020 with a split at the slash)
should somehow calculate 44193 (which is December 28th 2020).

I was thinking of making simply a large lookup table, but I have a feeling that's unnecessary.

Oh and I need to do this without VBA, just by using Excel functions.
 
Kudos to @ felixstraube for discovering a glitch in my formula from Post #29 -- it returns "53/1954" for 28-Dec-1953, which is obviously incorrect.

However, the formula suggested by felixstraube in Post #30, has a glitch as well -- it returns "53/1954" for 1-Jan-1954, which is also incorrect.

Here is an extensively tested formula (years 1950 through 2130) that seems to have no glitches:
Excel Formula:
=WEEKNUM(A1,21)&"/"&YEAR(WORKDAY.INTL(A1-4,1,"1110111"))
 
Last edited:
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
You nailed it!

I tested it with the 7 first and the 7 last days of every year from 1901 to 2200 and it always gave the expected result.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,684
Members
449,116
Latest member
HypnoFant

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