count of working days to include current month

DDT123

New Member
Joined
Aug 9, 2011
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Greetings, I have a table and needing to know the count of working days in a week but, to exclude days which fall into a different month from the weeknum. Our office is open Monday thru Saturday, so if the begin date falls on a Monday, there's potentially 6 working days in that week.

Example: week number 22 of year 2023 was May 29 thru June 4. There were 3 working days in week 22 which were in May.

I've included a screenshot of what the table should look like, but needing the formula in the first column.
 

Attachments

  • Mr Excel 06082023.jpg
    Mr Excel 06082023.jpg
    21.6 KB · Views: 8

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Try the following for June and adapt one of the alternatives to your data

T202306a.xlsm
CDEF
1June01-Jun-202330-Jun-202326
2
3Mon 29-May-23Sat 01-Jul-2326
4
53026
6
2e
Cell Formulas
RangeFormula
F1F1=NETWORKDAYS.INTL(D1,E1,11)
F3F3=NETWORKDAYS.INTL(MAX(C3,D1),MIN(E1,D3),11)
F5F5=C5-NETWORKDAYS.INTL(D1,E1,"1111110")
 
Upvote 0
And where is excel being told you are only interested in May?
This is for billing purposes. The company sends us a bill for the 1st thru 15th and the 16th thru the 31st of each month. I'm needing to break it down by week number when I'm doing an audit, so it should exclude the 1st thru 3rd of June, 2023 since those dates will be on the next billing cycle.
 
Upvote 0
Try the following for June and adapt one of the alternatives to your data

T202306a.xlsm
CDEF
1June01-Jun-202330-Jun-202326
2
3Mon 29-May-23Sat 01-Jul-2326
4
53026
6
2e
Cell Formulas
RangeFormula
F1F1=NETWORKDAYS.INTL(D1,E1,11)
F3F3=NETWORKDAYS.INTL(MAX(C3,D1),MIN(E1,D3),11)
F5F5=C5-NETWORKDAYS.INTL(D1,E1,"1111110")
unfortunately none of those formulas worked
 
Upvote 0
The formula certainly works.
You can post an extract of your sheet with the forum's tool named XL2BB.
Please indicate your expected results.
We can then adapt the formula for you.
 
Upvote 0
The formula certainly works.
You can post an extract of your sheet with the forum's tool named XL2BB.
Please indicate your expected results.
We can then adapt the formula for you.
I'm unable to download/install external applications without an admin login.

In your above example =NETWORKDAYS.INTL(D1,E1,11) Try entering May 29, 2023 into cell C3 and June 4, 2023 into cell D3. The output is 6 days but the desired output is 3 days since June 1 thru 4 needs to be excluded due to being a different month.
 
Upvote 0
I'm unable to download/install external applications without an admin login.

In your above example =NETWORKDAYS.INTL(D1,E1,11) Try entering May 29, 2023 into cell C3 and June 4, 2023 into cell D3. The output is 6 days but the desired output is 3 days since June 1 thru 4 needs to be excluded due to being a different month.
Dave's formula seems to return 3 for me:

1686251411213.png


Are you sure you entered everything correctly?
 
Upvote 0
T202306a.xlsm
ABCDEFG
1June01-Jun-202330-Jun-20232615-Jun-2023
2
3Mon 29-May-23Sat 01-Jul-2326
4
53026
6
7Mon 29-May-23Sun 04-Jun-233
8Mon 05-Jun-23Sun 11-Jun-236
9Mon 12-Jun-23Sun 18-Jun-23413
10Mon 19-Jun-23Sun 25-Jun-238
11Mon 26-Jun-23Sun 02-Jul-23513
12
13Thu 01-Jun-2315-Jun-202313
1416-Jun-202330-Jun-202313
15
2e
Cell Formulas
RangeFormula
F1F1=NETWORKDAYS.INTL(D1,E1,11)
F3F3=NETWORKDAYS.INTL(MAX(C3,D1),MIN(E1,D3),11)
F5F5=C5-NETWORKDAYS.INTL(D1,E1,"1111110")
G9G9=SUM(F7:F9)
F7:F8F7=NETWORKDAYS.INTL(MAX(C7,D$1),MIN(D7,G$1),11)
F9F9=NETWORKDAYS.INTL(MIN(C9,G$1),MIN(D9,G$1),11)
F10F10=NETWORKDAYS.INTL(MIN(C10,G$1+1),MIN(D10,E$1),11)
F11F11=NETWORKDAYS.INTL(MAX(C11,G$1),MIN(D11,E$1),11)
G11G11=SUM(F10:F11)
F13:F14F13=NETWORKDAYS.INTL(C13,D13,11)
 
Upvote 0

Forum statistics

Threads
1,215,098
Messages
6,123,082
Members
449,094
Latest member
mystic19

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