Formula to count the week from the first weekday of the month

InvaderZIM05

New Member
Joined
Jun 18, 2024
Messages
7
Office Version
  1. 2019
Platform
  1. Windows
Hello!

I am a newbie in terms of excel, but I would like your help in coming up with a formula so that I can count the weeks of the month starting from the first weekday of the month.

Example, is this month of June 2024, the first day is June 1 which falls on a Saturday counts as the first week of the month while June 2 counts as the second week when using the WEEKNUM function. I want to figure out a way to make it only start counting on the first WEEKDAY of the month which in this case is June 3 as the first week of the month.

Thank you in advanced for your help.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Here is a formula for you to try. It assigns week number 0 to Saturday, June 1, 2024 and Sunday, June 2, 2024.
Excel Formula:
=IFERROR(LOOKUP(A2,WORKDAY.INTL(WORKDAY(EOMONTH(A2,-1),1),{0,1,2,3,4},"0111111"),{1,2,3,4,5}),0)
 
Upvote 1
Or try this:

Book1
AB
1
21/6/20240
32/6/20240
43/6/20241
519/6/20243
630/6/20244
Sheet1
Cell Formulas
RangeFormula
B2:B6B2=NETWORKDAYS.INTL(EOMONTH(A2,-1)+1,A2,"0111111")
 
Upvote 1
Thank you all for your help! I am now able to get the results needed.
I appreciate your prompt responses.
 
Upvote 0
Please note that the formulas offered in Posts #3 and #4 return different results:
-The formula from Post #3 assigns week number 1 to the first weekday of the month -- as requested in the OP. Thus, for example, Thursday, August 1, 2024 is week 1.
-The formula from Post #4 assigns week number 1 to the first Monday of the month. Thus, for example, the first weekday of August (Thursday, Aug 1, 2024) is week 0.
 
Upvote 1
Please note that the formulas offered in Posts #3 and #4 return different results:
-The formula from Post #3 assigns week number 1 to the first weekday of the month -- as requested in the OP. Thus, for example, Thursday, August 1, 2024 is week 1.
-The formula from Post #4 assigns week number 1 to the first Monday of the month. Thus, for example, the first weekday of August (Thursday, Aug 1, 2024) is week 0.
Thank you for confirming.

I ran into some new challenges.
Do we have a function to get the first weekday of the week, removing the previous months days?

For example:

May 3, 2024 (Friday) will return May 1, 2024 (Wednesday)
May 7, 2024 (Tuesday) will return May 6, 2024 (Monday)

AB
1Audit DateWeek Start
2Friday - May 03, 2024Wednesday - May 01, 2024
3Tuesday - May 07, 2024Monday - May 06, 2024
 
Upvote 0
See if the following formula works for you:
Excel Formula:
=MAX(WORKDAY.INTL(A2+1,-1,"0111111"),WORKDAY(EOMONTH(A2,-1),1))
 
Upvote 1
Solution

Forum statistics

Threads
1,223,885
Messages
6,175,180
Members
452,615
Latest member
bogeys2birdies

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