+ Reply to Thread
Results 1 to 5 of 5

Display days between two dates

  1. #1
    Registered User
    Join Date
    05-06-2014
    Location
    Bulgaria
    MS-Off Ver
    Excel 2013
    Posts
    8

    Display days between two dates

    Hello excel gurus!

    I am using a function to calculate the days between two dates: =NETWORKDAYS(A2,B2)

    In this case I have a date in A2 and another in B2 and in C2 i'm displaying the number of days.

    However, if there is no value in one of the date fields (A2 or B2) it displays the error #VALUE! in C2.

    I know there is a workaround but i'm curious if there is a way to use an IF function in combination with NETWORKDAYS in the same column OR I have to create another column with function IFERROR so it won't display the #VALUE (For example column D2 with =IFERROR(C2,""))

    What do you think?

    Thanks in advance!
    Last edited by vinbg; 05-20-2014 at 09:14 AM.

  2. #2
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Display days between two dates

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

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

    Re: Display days between two dates

    Why don't you just do this:

    =IFERROR(NETWORKDAYS(A2,B2),"")

    Or...

    =IF(COUNT(A2,B2)<2,"",NETWORKDAYS(A2,B2))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    05-06-2014
    Location
    Bulgaria
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Display days between two dates

    Thanks guys, didn't knew you can use it like this =IFERROR(Networkdays...).

  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: Display days between two dates

    You're welcome. Thanks for the feedback!

+ 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: 2
    Last Post: 02-20-2014, 06:40 AM
  2. how do you display the current date as weeks and days detween 2 dates
    By john dalton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-16-2013, 01:36 PM
  3. [SOLVED] Number of Days Between Dates but if no Date go to next and return # of Days
    By Bikeman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-14-2012, 12:02 PM
  4. Display # of days between dates even if cell is blank or has "n/a" in it
    By geturbanized in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-05-2012, 11:50 AM
  5. [SOLVED] Subtract Two Dates By The Number of Days, But Only Inlcude Work Days
    By ptho16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-16-2012, 11:31 AM

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