Announcement

Collapse
No announcement yet.

Number Of Weekdays Between Two Dates

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Number Of Weekdays Between Two Dates



    Here is a formula to calculate the number of weekdays between two dates, inclusive. That is, the number of weekdays between Monday and the next day are 2. I am using this for a schedule spreadsheet where I need to see working days.

    In this example, cell A2 contains the earlier date and B2 contains the later date.

    =MAX(WEEKDAY(B2,2)-WEEKDAY(A2,2),0)+1+INT((B2-A2)/7)*5

    If you don't want it to be inclusive you can remove "+1".

    This, of course, does not take holidays into account.

  • #2
    Re: Number Of Weekdays Between Two Dates

    Thanks for sharing
    Hope that Helps

    Roy

    New users should read the Forum Rules before posting

    For free Excel tools & articles visit my web site

    If I have helped you and you feel like putting your hand in your pocket please make a donation to Children in Need

    RoyUK's Web Site

    royUK's Database Form

    Where to paste code from the Forum

    About me.

    Comment


    • #3
      Re: Number Of Weekdays Between Two Dates

      Formula doesn't work, though

      A2 = Friday 11th May 2007
      B2 = Tuesday 15th May 2007

      formula gives a result of 1

      For a count of weekdays between two dates without using NETWORKDAYS

      =SUM(INT((WEEKDAY(A2-{2,3,4,5,6})+B2-A2)/7))

      Comment


      • #4
        Re: Number Of Weekdays Between Two Dates

        Intresting - jiuk uses NETWORKDAYS even in Access I use NETWORKDAYS. Will have to remember to test these next week in my real work so Jack can test and compaire

        jiuk

        Comment


        • #5


          Re: Number Of Weekdays Between Two Dates

          I found some time after posting that this didn't work. I developed a formula that does work, though it's rather complex. If anybody really wants to see it I'll pull it out of the junk drawer.

          Then I discovered the NETWORKDAYS function and figured there was no point in continuing to post updates to this thread.

          Comment

          Working...
          X