Determining work days and date ranges (Gantt related)

davidstoll

New Member
Joined
Feb 7, 2007
Messages
29
I'm working on a gantt chart where I want to be able to determine the number of "work days" which occur as of a certain date (which could be a weekend or holiday start). I have to subtract non working days such as holidays, which are listed in another tab.

The function I am using is WORKDAY()

The problem I am having is if the function (WORKDAY) crosses over a holiday from start date plus the number of work days, it is off by one and it counts the holiday as a work day even though it is in the list. It seems to only have a problem if the holiday is a Monday. If I edit the holiday list to change the holiday (Labor day 2018) to a Tuesday, it all works fine.

I have attached a mini sheet with basic data so you can see what I am talking about.

http://www.filedropper.com/gantt-test

I hope it is ok to link to a test sheet??? If not, I apologize. I understand the security aspect. Let me know how I can get the data if the link is not acceptable.

Thank you
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Workday should work OK even if the holiday is a Monday.

You did not specify the Start date or the number of days.

N.B. I did not open your linked info.


Excel 2010
BCDEF
1StartDaysHolidays
2Fri 31-Aug-186Tue 11-Sep-18Mon 03-Sep-18
3
9b
Cell Formulas
RangeFormula
D2=WORKDAY(B2,C2,Holidays)
Named Ranges
NameRefers ToCells
Holidays='9b'!$F$2
 
Last edited:
Upvote 0
That is how it should work, but my example shows that there is a slight problem and I can't figure out what it is. Could you take a look?
 
Upvote 0
Post an example like I did in post #2 ; I used MrExcel Html Maker.
or
Provide the same information in your reply and specify your expected result.
 
Upvote 0
I cannot open the html file maker files for some reason. I'm sorry.


E______________________F____________________G__________H
"Scheduled Start"_________"Complete Date"_______"ignore"_____"DaysToComplete"

Sat 09/01/2018__________Fri 09/07/2018_________x__________4
Sun 09/02/2018__________Fri 09/07/2018_________x__________4
Mon 09/03/2018__________Fri 09/07/2018_________x__________4
Tue 09/04/2018__________Mon 09/10/2018________x__________4

09/03/2018 is a holiday in the holiday list.

"CompleteDate" formula for the last entry:
=WORKDAY(E15,H15,holidays!A$5:A$58)

Shouldn't the "CompleteDate" for the last entry be Fri 09/07/2018?
 
Last edited:
Upvote 0

Excel 2010
AEFGHIJ
1HolidaysStartDays
2Mon 03-Sep-18Sat 01-Sep-18Fri 07-Sep-184Tue-Fri
3Sun 02-Sep-18Fri 07-Sep-184Tue-Fri
4Mon 03-Sep-18Fri 07-Sep-184Tue-Fri
5Tue 04-Sep-18Mon 10-Sep-184Wed-Fri +Mon
6
9b
Cell Formulas
RangeFormula
F2=WORKDAY(E2,H2,Holidays)
F3=WORKDAY(E3,H3,Holidays)
F4=WORKDAY(E4,H4,Holidays)
F5=WORKDAY(E5,H5,Holidays)
Named Ranges
NameRefers ToCells
Holidays='9b'!$A$2


With the last row, the 4th date is Monday. wed thu Fri Mon =4
 
Last edited:
Upvote 0
So, the "Start Date" is not included in the days worked? That is counter intuitive to me.

If my intent is to include the start date as the first worked day, then I need to subtract 1 in the formula...?

F2 =WORKDAY(E2-1,H2,Holidays)
F3 =WORKDAY(E3-1,H3,Holidays)
F4 =WORKDAY(E4-1,H4,Holidays)
F5 =WORKDAY(E5-1,H5,Holidays)
 
Upvote 0
Glad the problem is solved.

The Help information states
"Returns a number that represents a date that is the indicated number of working days before or after a date (the starting date).
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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