I have noticed that these two (very helpful) functions are often overlooked when dealing with dates:
The NETWORKDAYS() function returns the number of days in a period, it removes the weekends and even holidays!
This is the syntax: =NETWORKDAYS(Start_Date, End_Date, [Holidays_Range])
The holidays range is an optional range that contains the dates of holidays, you can also use a named range for the holidays range.
Here are a couple of examples:
Return the number of workdays in a period:
=NETWORKDAYS(A1,B1,$D$1:$D$10)
' A1 contains the start date, B1 contains the end date and cells D1 to D10 contain the holidays.
The WORKDAYS() function returns the end date for a period, where the start date and the number of workdays are known.
This is the syntax: =WORKDAYS(Start_Date, Number_of_Days, [Holidays_Range])
The holidays range is an optional range that contains the dates of holidays, you can also use a named range for the holidays range.
Return the final workday in a period:
=WORKDAYS(A1,B1,Holidays)
A1 contains start date, B1 is the number of days in the period and Holidays is a Named Range.
Hope this helps!
Peace!![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)
Mike
Never say Never!!!
Nothing is impossible!!!
The NETWORKDAYS() function returns the number of days in a period, it removes the weekends and even holidays!
This is the syntax: =NETWORKDAYS(Start_Date, End_Date, [Holidays_Range])
The holidays range is an optional range that contains the dates of holidays, you can also use a named range for the holidays range.
Here are a couple of examples:
Return the number of workdays in a period:
=NETWORKDAYS(A1,B1,$D$1:$D$10)
' A1 contains the start date, B1 contains the end date and cells D1 to D10 contain the holidays.
The WORKDAYS() function returns the end date for a period, where the start date and the number of workdays are known.
This is the syntax: =WORKDAYS(Start_Date, Number_of_Days, [Holidays_Range])
The holidays range is an optional range that contains the dates of holidays, you can also use a named range for the holidays range.
Return the final workday in a period:
=WORKDAYS(A1,B1,Holidays)
A1 contains start date, B1 is the number of days in the period and Holidays is a Named Range.
Hope this helps!
Peace!
![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)
Mike
Never say Never!!!
Nothing is impossible!!!