+ Reply to Thread
Results 1 to 5 of 5

Datedif using blank cells

  1. #1
    Registered User
    Join Date
    04-19-2017
    Location
    Wirral, England
    MS-Off Ver
    2013
    Posts
    4

    Datedif using blank cells

    Hi All,

    So I have a spreadsheet to record the time someone spends at our service. Column K shows the date that the person entered and column M the date that they left.

    What I need in Cloumn L is a formula that calculates in Years, months and days the difference between the 2 if column M has a value and the difference between K and today's date if column M is blank

    Hope that makes sense, I'm getting completely lost using IF functions??!?

    Thanks in advance

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

    Re: Datedif using blank cells

    Try this formula in L2

    =DATEDIF(K2,IF(M2="",TODAY(),M2),"y")&" Years "&DATEDIF(K2,IF(M2="",TODAY(),M2),"ym")&" Months "&DATEDIF(K2,IF(M2="",TODAY(),M2),"md")&" Days"
    Audere est facere

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Datedif using blank cells

    Danp123

    Have you not already asked this question. You got a reply but did not bother to respond to it.
    https://www.excelforum.com/excel-for...ml#post4633995

    DominicB

  4. #4
    Registered User
    Join Date
    04-19-2017
    Location
    Wirral, England
    MS-Off Ver
    2013
    Posts
    4

    Re: Datedif using blank cells

    It was a similar question but did not specify a breakdown of days, months etc. Apologies meant to respond then got snowed under in work

  5. #5
    Registered User
    Join Date
    04-19-2017
    Location
    Wirral, England
    MS-Off Ver
    2013
    Posts
    4

    Re: Datedif using blank cells

    Perfect - Thanks Daddylonglegs

+ 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: 08-18-2016, 06:25 PM
  2. [SOLVED] DATEDIF - DATEDIF Calculation returning a negative for days or months
    By DaveBre in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-27-2015, 06:22 PM
  3. Count blank cells in a range and contiguous blank cells also as single cells! Tricky One!
    By SebastianColombia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2015, 02:32 PM
  4. DATEDIF when second date might be blank
    By aaronfly in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2015, 02:34 PM
  5. [SOLVED] Need blank cell instead of #ERROR in DATEDIF formual
    By unley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-18-2013, 04:03 AM
  6. DATEDIF, only if both cells have a value
    By sandboa in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-22-2013, 12:47 PM
  7. DateDif Average? Damn DateDif
    By UTCHELP in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-10-2012, 08:53 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