+ Reply to Thread
Results 1 to 6 of 6

NETWORKDAYS Fx

  1. #1
    Registered User
    Join Date
    05-20-2013
    Location
    Santa Monica, CA
    MS-Off Ver
    Excel 2010
    Posts
    3

    NETWORKDAYS Fx

    Hi. This should be relatively simple but I have a spreadsheet that I wish to calculate the number of days between two dates excluding the weekends and then subtracting 1 day so as to not include the first 24 hours. In any case, I can calculate this data just fine but I want the spreadsheet to not display an error, a false statement or a #value statement if no data is entered. Here is the formula I am using:

    =NETWORKDAYS(D2,G2)-DAY(1)

    I have tried various IF(AND) and IF(OR) combos but to no avail. Can anyone give me a simple suggestion for this? Thanks in advance.

    Chris

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: NETWORKDAYS Fx

    Maybe
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-20-2013
    Location
    Santa Monica, CA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: NETWORKDAYS Fx

    Quote Originally Posted by Pepe Le Mokko View Post
    Maybe
    Please Login or Register  to view this content.
    Thank you! That works, however it gives me a negative 1 value since it's then essentially subtracting 1 from 0 since no data is entered. Is there a way I can hide the -29577 or the -1 if nothing is entered. Thanks again! Maybe I just need to not include negative numbers in my formatting?

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: NETWORKDAYS Fx

    Like this ?
    Please Login or Register  to view this content.
    BTW don't quote entire posts unnecessarily, it clutters the thread - Thx

  5. #5
    Registered User
    Join Date
    05-20-2013
    Location
    Santa Monica, CA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: NETWORKDAYS Fx

    Thank you for your help Pepe and thank you for solving my issue!

    Chros

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: NETWORKDAYS Fx

    Quote Originally Posted by Pepe Le Mokko View Post
    =IF(OR(ISERROR(NETWORKDAYS(D2,G2)-1),(NETWORKDAYS(D2,G2)-1)<0),"",(NETWORKDAYS(D2,G2)-1))
    ISERROR won't work as part on an OR function, that formula will still return an error if D2 is a text value, for example. I suggest using

    =IFERROR(MAX(0,NETWORKDAYS(D2,G2)-1),"")
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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