+ Reply to Thread
Results 1 to 5 of 5

How to make "NETWORKDAYS" calculate the last day of month.

Hybrid View

  1. #1
    Registered User
    Join Date
    01-28-2011
    Location
    Brooklyn, NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    How to make "NETWORKDAYS" calculate the last day of month.

    I have the following formula below to calculate the percentage of business days left in the month where I use 21 as a constant. The formula works perfectly for what I'm trying to do.

    However, if i put in the last day of any month in "C177" (ex. 3/31/2011), then i get 0%. Any thoughts on how to fix this?

    =MAX(0,MIN(1,(NETWORKDAYS(C177,EOMONTH(C177,0)-1)/21)))

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to make "NETWORKDAYS" calculate the last day of month. Help!

    You're subtracting 1 from your end date so if C177 was 31st March you're calculating:

    31/3 to 30/3 -> -2 working days

    given your MAX wrapper you get a 0 result.

    What are you trying to calculate exactly - is the end date inclusive or exclusive of working day calculation ?

  3. #3
    Registered User
    Join Date
    01-28-2011
    Location
    Brooklyn, NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to make "NETWORKDAYS" calculate the last day of month.

    DonkeyOte - thank you for responding. the end date should be inclusive.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to make "NETWORKDAYS" calculate the last day of month.

    I would suggest then to use something along the lines of:

    =NETWORKDAYS(C177,EOMONTH(C177,0))/NETWORKDAYS(EOMONTH(C177,-1)+1,EOMONTH(C177,0))
    The above would ensure the denominator reflects the number of working days in the month being analysed (rather than constant of 21)
    You can of course add public holiday ranges as nec. to NETWORKDAYS

  5. #5
    Registered User
    Join Date
    01-28-2011
    Location
    Brooklyn, NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to make "NETWORKDAYS" calculate the last day of month.

    Great. Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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