+ Reply to Thread
Results 1 to 6 of 6

Spreadsheet that will calculate networkdays in each month of a date range with 20 day max

  1. #1
    Registered User
    Join Date
    12-18-2015
    Location
    Victoria
    MS-Off Ver
    2013
    Posts
    3

    Spreadsheet that will calculate networkdays in each month of a date range with 20 day max

    I am trying to calculate how many days a teacher has worked in a date range assuming that each month is worth a maximum of 20 days. Weekends do not count. Our school year runs from September 1 to June 30 so it crosses over two years (ex. 9/1/14 to 6/30/15). The entire school year is considered 200 days and works out that each month is worth a maximum of 20 days.

    I would like to enter a date range and have an automatic calculation that will break down each month but not exceed 20 days a month (not including weekends). Here is a sample of what I have entered by hand and calculated by hand (attached, I hope)
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,825

    Re: Spreadsheet that will calculate networkdays in each month of a date range with 20 day

    I remember doing something like that a few years ago for another poster. It's getting a bit late here for me to start looking for it now, but if I get chance tomorrow I'll see if I can find it.

    Pete

  3. #3
    Registered User
    Join Date
    12-18-2015
    Location
    Victoria
    MS-Off Ver
    2013
    Posts
    3

    Re: Spreadsheet that will calculate networkdays in each month of a date range with 20 day

    That my friend would be awesome! I look forward to hearing back from you. Happy Holidays!

  4. #4
    Forum Contributor
    Join Date
    01-11-2011
    Location
    Frederick, MD, USA
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Spreadsheet that will calculate networkdays in each month of a date range with 20 day

    Is this simply a theoretical approach? Or would you like it to reflect reality?

    That is, are you working on the assumption that every month does indeed have 20 working days? Or would you like to factor in that some months are longer than others (Feb has fewer than March), and some months have holidays?

  5. #5
    Registered User
    Join Date
    12-18-2015
    Location
    Victoria
    MS-Off Ver
    2013
    Posts
    3

    Re: Spreadsheet that will calculate networkdays in each month of a date range with 20 day

    20 days regardless of holidays or shortened months

  6. #6
    Forum Contributor
    Join Date
    01-11-2011
    Location
    Frederick, MD, USA
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Spreadsheet that will calculate networkdays in each month of a date range with 20 day

    Hrm. That's going to be a little weird, because the range of 01SEP to 30JUN actually contains 215-218 weekdays (depending on the year), not 200. Trying to force Excel to do bad math only works when you want it to do good math... It would actually be a lot simpler (and more precise) to count the precise number of days or weekdays in a given span.

    So, what you really need to do is

    1) Calculate the fraction of each month that falls into the given range
    2) multiply that portion by 20 days.

    Formulae like DATEDIF can calculate the number of complete months within a range; the tricky part is going to be figuring out the portion of partial months at the beginning and end of a range, especially since there will be times when the number of actual weekdays in a given "partial" month will be greater than 20 (for example, the "partial" month of Jan 1 to Jan 29, 2015 still has 21 weekdays in it).

    It seems to me that the only way to do that would be to build a table similar to what you have, but it's got to be a different table for every single year that you've got in your range.

+ 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: 3
    Last Post: 10-15-2015, 01:06 PM
  2. Formaula needed to Calculate orevious month revenue by name and date range
    By Chykat2000 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-23-2015, 08:37 AM
  3. NETWORKDAYS Function to calculate a start date.
    By wiseguy298 in forum Excel General
    Replies: 3
    Last Post: 12-21-2014, 07:08 PM
  4. Replies: 0
    Last Post: 07-17-2014, 06:31 AM
  5. Count number of networkdays for each month in a multi month period
    By dreddster in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-10-2013, 11:12 AM
  6. [SOLVED] Help with NETWORKDAYS function to calculate within date ranges
    By wembleybear in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2013, 03:52 AM
  7. Replies: 4
    Last Post: 01-28-2011, 03:01 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