+ Reply to Thread
Results 1 to 7 of 7

How to remove days from a date range

Hybrid View

  1. #1
    Registered User
    Join Date
    03-26-2012
    Location
    london, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to remove days from a date range

    Hello,
    I am looking for a formula to remove some specific days from the count of days between two dates.

    I want to calculate the difference in days between the two dates but also removing some specific days that fall in between the two days.
    I am doing this because I need to subtract weekends and holidays from the count. I cannot use NETWORKDAYS() because I have a spreadsheet with Arabic week as well, however if anyone knows a workaround to that it would be excellent as well.


    thanks!

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: How to remove days from a date range

    Hi stefanob,

    Welcome to the forum.

    NETWORKDAYS(start_date,end_date,holidays)

    Arabic issue can be worked upon.. I would still suggest you to use the networkdays function and put the days, in Holidays part of the syntax, which you want to remove from calculation.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: How to remove days from a date range

    stefan

    what is the issue with NETWORKDAYS and Arabic week?

  4. #4
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: How to remove days from a date range

    Sunday is the first day of the week in the Arabic week.

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: How to remove days from a date range

    Of course it is, I should have remembered that.

    It is easily managed with NETWORKDAYS, just add 1 to the start and end dates, fool it into thinking that Sun is Mon, Mon is Tue, etc.

    =NETWORKDAYS(A1+1,A2+1)

    To cater for holidays, you need an adjusted range of holidays where each date is incremented by 1

    =NETWORKDAYS(A1+1,A2+1,adjusted_holidays)
    Last edited by Bob Phillips; 03-27-2012 at 08:33 AM.

  6. #6
    Registered User
    Join Date
    03-26-2012
    Location
    london, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to remove days from a date range

    I think this has done it, thank you very much!



    Quote Originally Posted by Bob Phillips View Post
    Of course it is, I should have remembered that.

    It is easily managed with NETWORKDAYS, just add 1 to the start and end dates, fool it into thinking that Sun is Mon, Mon is Tue, etc.

    =NETWORKDAYS(A1+1,A2+1)

    To cater for holidays, you need an adjusted range of holidays where each date is incremented by 1

    =NETWORKDAYS(A1+1,A2+1,adjusted_holidays)

  7. #7
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: How to remove days from a date range

    BTW, if you have Excel 2010, there is a new function NETWORKDAYS.INTL that addresses this issue

    =NETWORKDAYS.INTL(A1,A2,7,holidays)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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