+ Reply to Thread
Results 1 to 10 of 10

Count number of days between two date where off days are Friday,Sat & Only Friday

  1. #1
    Registered User
    Join Date
    03-14-2014
    Location
    Abudhabi,UAE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Count number of days between two date where off days are Friday,Sat & Only Friday

    Hi All
    I am new here and required an assistance in following 2 queries

    As i am making process TAT(Turn Around Time) which required following information

    In Excel 2007

    1-Count number of days between two dates where working days are (Sun to Thursday). So required to exclude (Friday,Sat + Holidays)

    A1-Start Date Mar/01/2014
    B1-End Date Mar/31/2014
    C1-No Of Days 22
    D1-Days between two dates 21
    E1 To E10-Holidays

    2-Count number of days between two dates where working days are (Sat to Thursday). So required to exclude (Friday + Holidays)


    A1-Start Date Mar/01/2014
    B1-End Date Mar/31/2014
    C1-No Of Days 27
    D1-Days between two dates 26
    E1 To E10-Holidays

    Note : Any weekend (off days) dates listed in holidays should not effect the query


    Appreciate your URGENT help

  2. #2
    Registered User
    Join Date
    02-27-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Count number of days between two date where off days are Friday,Sat & Only Friday

    Please have a look at this:
    http://www.excelforum.com/excel-form...ml#post3536846

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count number of days between two date where off days are Friday,Sat & Only Friday

    Hi,

    Check out the =NETWORKDAYS.INTL() function.
    Setting the third element to 7 will exclude Fridays & Saturdays, and 16 which will exclude Fridays. The fourth element will exclude pre-defined holidays.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    03-14-2014
    Location
    Abudhabi,UAE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Count number of days between two date where off days are Friday,Sat & Only Friday

    Thanks for the prompt feedback.. let me check

  5. #5
    Registered User
    Join Date
    03-14-2014
    Location
    Abudhabi,UAE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Count number of days between two date where off days are Friday,Sat & Only Friday

    Thanks Richard.. But this function is in Excel 2010 which is so easy... I am looking same assistance in Excel 2007

  6. #6
    Registered User
    Join Date
    03-14-2014
    Location
    Abudhabi,UAE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Count number of days between two date where off days are Friday,Sat & Only Friday

    Quote Originally Posted by chinraj View Post
    Thanks Chinraj But i am sorry it seems not related with my requirements. I have alternate off days which is annoying me

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count number of days between two date where off days are Friday,Sat & Only Friday

    A pragmatic approach then would be to simply create a long 'holiday' list of all the dates you want to exclude.

  8. #8
    Registered User
    Join Date
    03-14-2014
    Location
    Abudhabi,UAE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Count number of days between two date where off days are Friday,Sat & Only Friday

    I came up with following formulas

    Exclude Fri,Sat+Holiday
    =SUM(INT((WEEKDAY(B3-{1,2,3,4,5})+I3-B3)/7))-SUMPRODUCT(--(AF3:AF20>=B3),--(AF3:AF20<=I3))

    Exclude Fri+Holiday
    =SUM(INT((WEEKDAY(K3-{1,2,3,4,5,7})+M3-K3)/7))-SUMPRODUCT(--(AF3:AF20>=K3),--(AF3:AF20<=M3))

    BUT
    Only showing number of working days within two dates not between two dates
    &
    If you add dates of Fridays and Saturdays in Holiday field it also effects to result - "which shouldn't"



    I believe i am so close

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Count number of days between two date where off days are Friday,Sat & Only Friday

    I don't understand the distinction between "number of days" and "days between two dates" - how are you defining those?

    Where you have 2 successive weekend days you can manipulate NETWORKDAYS function for any weekend, e.g. following your example with start date in B3, end date in I3 and holidays in AF3:AF20 you can use this formula to count working days, inclusive of start and end date but excluding Fridays, Saturdays and holidays

    =NETWORKDAYS(B3+1,I3+1,INDEX(AF$3:AF$20+1,0))

    Your solution for excluding just Fridays and holidays is good but you need to add a clause to the SUMPRODUCT to stop it counting any Fridays in the holiday range, i.e.

    =SUM(INT((WEEKDAY(K3-{1,2,3,4,5,7})+M3-K3)/7))-SUMPRODUCT(--(AF$3:AF$20>=K3),--(AF$3:AF$20<=M3),--(WEEKDAY(AF$3:AF$20)<>6))
    Audere est facere

  10. #10
    Registered User
    Join Date
    03-14-2014
    Location
    Abudhabi,UAE
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Count number of days between two date where off days are Friday,Sat & Only Friday

    Superb ,, fantastic this is what i was looking for

    Thanks a lot

+ 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. [SOLVED] Count the days excluding Friday in every month using a date range.
    By miss_chloe in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-23-2013, 10:42 AM
  2. [SOLVED] Count days except Friday
    By Shakeelqamar in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-09-2013, 11:55 AM
  3. Count number of days minus Friday and or Saturday
    By aj34321 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-21-2013, 06:22 PM
  4. How to count all dates in column A using last friday and and next friday friday
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2011, 04:33 PM
  5. [SOLVED] set payment date 28 days after following friday
    By rhydim in forum Excel General
    Replies: 3
    Last Post: 08-22-2006, 07:30 AM

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