+ Reply to Thread
Results 1 to 7 of 7

Build in Formula to count Weekend between 2 dates

  1. #1
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Build in Formula to count Weekend between 2 dates

    Hi,

    Besides using workaround DAYS() - NETWORKDAYS(),

    Is there any build-in function to count weekend days between 2 dates.
    1. Thank those who have helped you by clicking the Star * below the post.
    2. Please mark your post [SOLVED] if it has been answered satisfactorily.

    Sincerely,
    Farid

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Build in Formula to count Weekend between 2 dates

    Possible with using sumproduct and weekday()?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Build in Formula to count Weekend between 2 dates

    Hi FDibbins,

    WEEDAY() will return 1 to 7 (Sunday to Saturday). It is really nonsense to count number of days in weekend between 2 dates.

  4. #4
    Registered User
    Join Date
    09-29-2015
    Location
    Essex, England
    MS-Off Ver
    2013
    Posts
    10

    Re: Build in Formula to count Weekend between 2 dates

    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    where B2 is your start date and C2 is your end date. The "1111100" part indicates which days to include/exclude, i.e. 1 = exclude, 0 = include.

  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: Build in Formula to count Weekend between 2 dates

    Here are 2 ways...

    A1 = start date
    B1 = end date

    To count the Saturday and Sunday dates within the date range of A1:B1...

    =SUM(INT((WEEKDAY(A1-{6,7},2)+B1-A1)/7))

    =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)>=6))
    Last edited by Tony Valko; 09-30-2015 at 05:38 AM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Build in Formula to count Weekend between 2 dates

    Hi mattsmith,

    Thanks a lot. welcome to forum

    @ Tony,

    Tq for another alternative method.

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

    Re: Build in Formula to count Weekend between 2 dates

    You're welcome!

+ 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] formula to identify weekend dates
    By Barb Reinhardt in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 09-06-2005, 07:05 PM
  2. [SOLVED] formula to identify weekend dates
    By Barb Reinhardt in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 09-06-2005, 05:05 PM
  3. [SOLVED] formula to identify weekend dates
    By Cathy Landry in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  4. formula to identify weekend dates
    By Cathy Landry in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  5. [SOLVED] formula to identify weekend dates
    By Cathy Landry in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. [SOLVED] formula to identify weekend dates
    By Cathy Landry in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  7. formula to identify weekend dates
    By Cathy Landry in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. formula to identify weekend dates
    By Cathy Landry in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-23-2005, 03:05 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