Troubleshooting Assistance: Working Days in Month Based on Date Range

KBChristensen

New Member
Joined
Feb 6, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I'm trying to troubleshoot some issues I'm having with a formula for finding working days in each month in a given date range.

kbc-calcSuccess.png


In the example above you can see the formula I'm trying to apply to my "real" sheet. I have no trouble getting it to work in this "test" sheet, but as you can see below, it fails to work properly in the "real" sheet.


kbc-calcFails.png


For Row 2 I would've expected the result to be: J2 = 12, K2 = 2, L2 = 0, M2 = 0 and so on...

For Row 3 I would've expect the result to be: J3 = 10, K3 = 0, L3 = 0, M3 = 0 and so on...

Anyone able to discern or have an idea what I'm doing wrong in the "real" sheet?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi & welcome to MrExcel.
Is you "real" sheet formatted as a structured table?
Also can you please post the actual formula, rather than an image.
 
Upvote 0
Hi Fluff,

Thanks for responding.

I think it is, yes. It is a combination of two other sheets.

The formula is here:
=MAX(0,NETWORKDAYS.INTL(MAX(J$1,$C2),MIN(EOMONTH(J$1,0),$D2),1))
 
Upvote 0
I think it is, yes
That's the problem, tables convert the headers to text, so they are not real dates.
Try
Excel Formula:
=MAX(0,NETWORKDAYS.INTL(MAX(--J$1,$C2),MIN(EOMONTH(--J$1,0),$D2),1))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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