+ Reply to Thread
Results 1 to 9 of 9

How to exclude Sundays and other holidays while finding the difference between dates

  1. #1
    Registered User
    Join Date
    05-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2010
    Posts
    31

    How to exclude Sundays and other holidays while finding the difference between dates

    Hi,

    It is pretty easy to find the difference between 2 dates in excel "date 1 - date 2"..... but I'm not quite sure as to how one would do it while excluding holidays! Would be great if you know of any ways around it. Thanks

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: How to exclude Sundays and other holidays while finding the difference between dates

    Try to use the 'networkdays' formula
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: How to exclude Sundays and other holidays while finding the difference between dates

    Use the NETWORKDAYS.Intl function, with a list of holidays, if you want to include Saturdays.
    See help for the third argument values to use.

    =NETWORKDAYS.INTL(DATE(2014,7,1),DATE(2014,7,11),11,{"2014/7/4","2014/7/5"})

    The 11 means Sundays are ignored, and 7/4 and 7/5 are holidays.
    Last edited by Bernie Deitrick; 07-25-2014 at 03:18 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to exclude Sundays and other holidays while finding the difference between dates

    NETWORKDAYS.INTL has the ability to exclude holidays just like Bernie Deitrick says. The holidays that you want omitted are listed in a column and they are selected when you write formula.

    The weekends are specified in the formula with:

    1 or omitted Saturday, Sunday
    2 Sunday, Monday
    3 Monday, Tuesday
    4 Tuesday, Wednesday
    5 Wednesday, Thursday
    6 Thursday, Friday
    7 Friday, Saturday
    11 Sunday only
    12 Monday only
    13 Tuesday only
    14 Wednesday only
    15 Thursday only
    16 Friday only
    17 Saturday only
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to exclude Sundays and other holidays while finding the difference between dates

    Quote Originally Posted by newdoverman View Post

    The weekends are specified in the formula with:

    1 or omitted Saturday, Sunday
    2 Sunday, Monday
    3 Monday, Tuesday
    4 Tuesday, Wednesday
    5 Wednesday, Thursday
    6 Thursday, Friday
    7 Friday, Saturday
    11 Sunday only
    12 Monday only
    13 Tuesday only
    14 Wednesday only
    15 Thursday only
    16 Friday only
    17 Saturday only
    Or, you can define which days are to be evaluated as "weekend" days by using a 7 character string of 1s and 0s where 1s are evaluated as the weekends and 0s are evaluated as workdays.

    The 7 characters represent the weekdays starting from Monday thru Sunday.

    For example, this means the weekends are Monday and Thursday:

    =NETWORKDAYS.INTL(start_date,end_date,"1001000")

    If you're a member of the U.S. Congress then this means your weekends are Monday, Tuesday, Friday, Saturday and Sunday:

    =NETWORKDAYS.INTL(start_date,end_date,"1100111")

    The NETWORKDAYS.INTL function was introduced in Excel 2010.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    07-17-2014
    Location
    Turkey
    MS-Off Ver
    2003
    Posts
    85

    Re: How to exclude Sundays and other holidays while finding the difference between dates

    Hello I can't use workdays.int or networkdays function in my computer. Maybe it's new at the 2010/Excel. How can I use this function as macro code?

  7. #7
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: How to exclude Sundays and other holidays while finding the difference between dates


  8. #8
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: How to exclude Sundays and other holidays while finding the difference between dates

    Quote Originally Posted by Tony Valko View Post
    If you're a member of the U.S. Congress then this means your weekends are Monday, Tuesday, Friday, Saturday and Sunday:
    =NETWORKDAYS.INTL(start_date,end_date,"1100111")
    LMAO... nice. Also replying so there will be 2 pittsburghers in one thread!
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  9. #9
    Registered User
    Join Date
    05-25-2012
    Location
    toronto
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: How to exclude Sundays and other holidays while finding the difference between dates

    awesome.... thanks a lot guys...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. counting difference in days but need to exclude holidays and weekends.
    By SnowBrian in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-21-2014, 03:26 PM
  2. [SOLVED] Subtracting 2 dates, exclude Sundays & Holidays (in list) - outside US
    By husni in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-19-2014, 10:11 PM
  3. hour difference between two dates/times, exclude weekends and holidays
    By lamdl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-23-2014, 09:11 PM
  4. Exclude Sundays between two dates
    By buffalobill in forum Excel General
    Replies: 4
    Last Post: 03-27-2010, 05:41 AM
  5. String of dates to exclude weekends AND holidays
    By FEI7774 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-01-2009, 06:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1