+ Reply to Thread
Results 1 to 9 of 9

Formula needed to calculate working days in specified month between two dates

  1. #1
    Registered User
    Join Date
    07-11-2011
    Location
    Gatineau, QC
    MS-Off Ver
    Excel 2010
    Posts
    50

    Formula needed to calculate working days in specified month between two dates

    Hi,

    Does anyone know a formula I could use to tell me the number of working days in a specified month between start and end dates? I have the start and end dates in separate columns and the month in a separate cell.

    Thanks!

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula needed to calculate working days in specified month between two dates

    Look at the Networkdays function...

    =Networkdays(startdate, enddate, holidays)

    Holidays is an optional range for you to enter holiday dates to be excluded from the count.

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

    Re: Formula needed to calculate working days in specified month between two dates

    Are your normal workdays Monday thru Friday? Will you need to exclude any holiday dates?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    07-11-2011
    Location
    Gatineau, QC
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Formula needed to calculate working days in specified month between two dates

    Quote Originally Posted by Tony Valko View Post
    Are your normal workdays Monday thru Friday? Will you need to exclude any holiday dates?
    Hi,

    The workdays are Monday - Friday and holidays shouldn't be excluded. The tricky part is that I need to specify the month between the start and end date for which the working days should be calculated.

    For example, if the start date is April 1, 2013 and the end date is May 17, 2013, I want to calculate only the working days in May 2013.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula needed to calculate working days in specified month between two dates

    So then it's the month of the EndDate that matters?

    Try

    =NETWORKDAYS(MAX(StartDate,EndDate-DAY(EndDate)+1),EndDate)

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

    Re: Formula needed to calculate working days in specified month between two dates

    Why can't you just define the period as May 1 2013 thru May 17 2013?

  7. #7
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    Re: Formula needed to calculate working days in specified month between two dates

    If you have start date in A2 and end date in B2 then list the 1st of each month in C1 across and then use this formula in C2 copied across for the number of workdays in each month

    =MAX(0,NETWORKDAYS(MAX($A2,C$1),MIN($B2,EOMONTH(C$1,0))))

    You can format Row 1 as mmm-yyyy or similar
    Audere est facere

  8. #8
    Registered User
    Join Date
    07-11-2011
    Location
    Gatineau, QC
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Formula needed to calculate working days in specified month between two dates

    Thanks Daddylonglegs! It works!

  9. #9
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,163

    Re: Formula needed to calculate working days in specified month between two dates

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Replies: 15
    Last Post: 06-03-2014, 02:08 PM
  2. Replies: 7
    Last Post: 06-19-2013, 05:45 AM
  3. Replies: 9
    Last Post: 10-17-2012, 10:33 PM
  4. Calculate weeks between two dates (working Days)
    By Zyphon in forum Excel General
    Replies: 6
    Last Post: 04-23-2008, 12:12 PM
  5. Is there a way to calculate business working days between dates i.
    By hjyoungii in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2005, 01:06 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