Number weeks from a given date

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
677
Office Version
  1. 365
Platform
  1. MacOS
Hi all,

I have a worksheet (link below) in which I record my (not)parkruns. The (not)parkrun initiative has been running since 18/06/2020, so the first week that it was possible to record one was 15/06/2020 - 21/06/2020 (Week 1). In my worksheet, I want to be able to identify what possible week number each run has been completed in (column BD). I have manually populated column BD for now, but need a formula to calculate this for me.

Screenshot 2023-03-21 at 15.43.12.jpeg


Up until week 141 I did at least 1 run in every possible week, but in week 142 I didn’t record any, therefore this is where columns AK and BD should diverge. i.e. The number of possible weeks becomes 1 more than the cumulative number in which I have completed runs. The second time I miss a run the gap will become 2 and the next 3 and so on…

So, I need a formula to calculate column BD (possible weeks) - which I have currently manually populated in yellow. i.e. make 15/06/2020 - 21/06/2020 the first Monday - Sunday (week ‘1’) and from then using the date in column B populate column BD with the relevant possible week number.

Link to file (OneDrive): BD Column Calculation.xlsx

Thanks in advance!

Olly.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
How about
Excel Formula:
=NETWORKDAYS.INTL(DATE(2020,6,15),B4,"0111111")-1
 
Upvote 0
Solution
Thank you, I had never seen that function before. It worked with one small tweak of the start date: =NETWORKDAYS.INTL(DATE(2020,6,7),B4,"0111111")-1 instead of =NETWORKDAYS.INTL(DATE(2020,6,15),B4,"0111111")-1, which then makes the first week week 1, rather than 0.

Screenshot 2023-03-21 at 16.22.07.jpg


Thanks so much.
 
Upvote 0
It should actually be
Excel Formula:
=NETWORKDAYS.INTL(DATE(2020,6,15),B4,"0111111")
Your calculations go wrong on row 120. You have that as 56 when it should be 57
 
Upvote 0

Forum statistics

Threads
1,214,613
Messages
6,120,515
Members
448,968
Latest member
Ajax40

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