Forum Discussion
Help with Workday formula
Hi,
The result of the formula is correct!
Please note that the https://support.office.com/en-us/article/workday-function-f764a5b7-05fc-4494-9486-60d494efbf33?NS=EXCEL&Version=16&SysLcid=1033&UiLcid=1033&AppVer=ZXL160&HelpId=xlmain11.chm60519&ui=en-US&rs=en-US&ad=US function works this way:
- It looks at the start date.
- It skips the to the next workday that is nonweekend and nonholiday.
- The number of skips is based on the second argument of the function (days).
- You have an option to define the holidays in the third argument, to make the function take them into account.
- The holidays' argument is optional, you can omit it, which is means that there are no holidays.
- No matter if the start date is a holiday or weekend, it's just a starting point.
In the formula above, since the start date is 01/01/2018 and the number of days (skips) is 1, it will return the next workday 02/01/2018 which is nonweekend and nonholiday.
The formula will return 03/01/2018 in case if you make the day of 02/01/2018 is the holiday.
Hope that helps
Haytham
- MuzaffarSiddiquiSep 09, 2020Copper Contributor
Hi,
I have made the attached excel project plan and it is working fine but I have to select holidays manually by seeing the country of the assignee. I want this to be done as per the countries defined in the project plan by seeing the list of per country holidays from the field value of the assignee location. My excel sheet is attached to this email.
I am using this formula to calculate the start and end dates of each task:
=WORKDAY(E12,(F12),Holidays!$B$5:$B$8)
I have tried to change the above formula by adding different conditions but nothing works.
I am also looking to protect/lock formula cells dynamically, i.e., when we defined formula. Is it possible?
I am also looking to have different colors for formula fields dynamically. I don't know whether it is possible?
I have lost a lot of my time to sort out this formula but none was successful. Your kind help is appreciated.
Thank you in advance for your help.Muzaffar
- Grace SApr 13, 2018Copper ContributorHi Haytham,
Thanks for the explanation.
Can you recommend the formula so that for 1st Jan is accounted for holiday as it is the start date? So Excel can find that 2 Jan is the actual start date (acknowledging the start date is holiday) and the so than it can then find that the next working day so the result showing as 3 Jan?
Grace- Haytham AmairahApr 13, 2018Silver Contributor
Hi,
I suggest using this formula instead:
=WORKDAY(IF(A1=A2,A1+1,A1),1,A2)
This portion of the formula IF(A1=A2,A1+1,A1) will check if the start date is equal to the holiday.
If so, it will add one day to the start day, otherwise, will still as it is.
- Grace SApr 13, 2018Copper ContributorThank you, much appreciated.
Grace