Is there a way to not include weekends and or holidays in an Excel formula involving dates? Example:
=Q2-Q1
(a date in q2
minus a date in q1
= so many days) Excluding weekends & holidays?
microsoft excelmicrosoft-excel-2007microsoft-excel-2010microsoft-excel-2013
Is there a way to not include weekends and or holidays in an Excel formula involving dates? Example:
=Q2-Q1
(a date in q2
minus a date in q1
= so many days) Excluding weekends & holidays?
Best Answer
WORKDAY
The function
WORKDAY
is used to calculate the date a certain amount of work days before or after the start date - information hereExample usage:
=WORKDAY(A2,A3,A4:A6)
- Where A2 is your start date, A3 is the amount of days from this date you wish to add or subtract, and A4:A6 each contain a holiday date to excludeNETWORKDAYS
Alternatively, the function
NETWORKDAYS
is used to calculate the amount of work days between two dates - information hereExample usage:
=NETWORKDAYS(A2,A3,A4:A6)
- Where A2 is your start date, A3 is your end date, and A4:A6 contain holiday dates you wish to exclude..INTL
In case you need this to work in a situation where weekends are not defined the same way (Saturday and Sunday), both of these formulas have a
.INTL
function, where they also take aWeekend
argument as the third argument. Note - This is only supported in Excel 2010+. Information on WORKDAY.INTL and NETWORKDAYS.INTL.This argument would be an integer, referring to these options:
This would affect the formulas above as such, specifying
Monday only
as your "weekend":=WORKDAY.INTL(A2,A3,12,A4:A6)
and
=NETWORKDAYS.INTL(A2,A3,12,A4:A6)