+ Reply to Thread
Results 1 to 7 of 7

Three if statements to calculate number of days lapsed

  1. #1
    Registered User
    Join Date
    12-04-2009
    Location
    Dallas Texas
    MS-Off Ver
    Excel 2007
    Posts
    8

    Smile Three if statements to calculate number of days lapsed

    I have two dates fields, BEGIN DATE and END DATE, and I want to capture the number of days between these two dates. The fields may also be blank. How do I create three if statements on one cell?
    1) if BEGIN = 0, then show "N/A"
    2) if BEGIN > 0 and END = 0, then show "N/A"
    3) if BEGIN > 0 and END > 0, then show the number of days BEGIN - END

    Can someone pls help me?

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

    Re: Three if statements to calculate number of days lapsed

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-04-2009
    Location
    Dallas Texas
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Three if statements to calculate number of days lapsed

    I copied and pasted this into my spreadsheet and am receiving an error "you've entered too few arguments for this function"... any ideas?

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

    Re: Three if statements to calculate number of days lapsed

    Post a sample of your sheet

  5. #5
    Registered User
    Join Date
    12-04-2009
    Location
    Dallas Texas
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Three if statements to calculate number of days lapsed

    see attached
    Attached Files Attached Files

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

    Re: Three if statements to calculate number of days lapsed

    Try this formula in C2 copied down

    =IF(COUNT(A2,B2)=2,B2-A2,"N/A")
    Audere est facere

  7. #7
    Registered User
    Join Date
    12-04-2009
    Location
    Dallas Texas
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Three if statements to calculate number of days lapsed

    Perfect! That did it. 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