+ Reply to Thread
Results 1 to 16 of 16

DATEDIF function is not working in Excell 2013

  1. #1
    Registered User
    Join Date
    10-19-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    6

    DATEDIF function is not working in Excell 2013

    Property Address: Days on the Market: Date listed (C5) Date Sold: (D5)
    123 Excel Street #NUM 1/12/2016 4/12/2016

    =Datedif(D5,TODAY(),"Y")

    This formula/function works fine in Excel 2010, but its not in Excel 2013. Instead, I get #NUM in the cell.

    Please help!

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

    Re: DATEDIF function is not working in Excell 2013

    Whatever is in C5 is not a true Excel date.

    Format the cell as Date then re-enter the date (in that order!).
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: DATEDIF function is not working in Excell 2013

    I can only get the #NUM error if the date in D5 is greater than today's date.
    Which appears to be the case in your example

    Quote Originally Posted by SoftwareUzer View Post
    Property Address: Days on the Market: Date listed (C5) Date Sold: (D5)
    123 Excel Street #NUM 1/12/2016 4/12/2016

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: DATEDIF function is not working in Excell 2013

    Quote Originally Posted by Tony Valko View Post
    Whatever is in C5 is not a true Excel date.
    In that case, the error would be #Value!, not #Num!

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: DATEDIF function is not working in Excell 2013

    Have you got D5 and TODAY() the right way round?
    If posting code please use code tags, see here.

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

    Re: DATEDIF function is not working in Excell 2013

    Quote Originally Posted by Jonmo1 View Post
    In that case, the error would be #Value!, not #Num!
    Yes, good catch.

  7. #7
    Registered User
    Join Date
    10-19-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    6

    Re: DATEDIF function is not working in Excell 2013

    The date was already formatted correctly but still it is not executing.

    =Dateif(D5,Today(),"Y")

    A.K.A. =Dateif(4/12/2016,TODAY(),"Y")

    has something changed in 2013?

  8. #8
    Registered User
    Join Date
    10-19-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    6

    Re: DATEDIF function is not working in Excell 2013

    Correction =Datedif(D5,Today(),"Y")

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

    Re: DATEDIF function is not working in Excell 2013

    Did you see post #3?

    Tell us what date is in D5.

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: DATEDIF function is not working in Excell 2013

    Quote Originally Posted by SoftwareUzer View Post
    =Dateif(D5,Today(),"Y")

    A.K.A. =Dateif(4/12/2016,TODAY(),"Y")

    has something changed in 2013?
    Nothing has changed.
    Datedif(startdate,enddate,"Y")

    The Start Date cannot be greater than the End Date (we can't travel backwards in time....Yet)

  11. #11
    Registered User
    Join Date
    10-19-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    6

    Re: DATEDIF function is not working in Excell 2013

    OOOOhhh Shizzit! It worked Jonno1. =Datedif(C5,D5,"Y")

    =Datedif(D5,TODAY(),"Y") works fine in Excel 2010
    Anyhow, thanks

  12. #12
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: DATEDIF function is not working in Excell 2013

    you know you can tweak the datedif formula for the occasions the dates are reversed. =iferror(Datedif(C5,D5,"Y"),Datedif(D5,C5,"Y")) or =IFERROR(DATEDIF(C5,TODAY(),"Y"),DATEDIF(D5,TODAY(),"Y"))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  13. #13
    Registered User
    Join Date
    10-19-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    6

    Re: DATEDIF function is not working in Excell 2013

    That's good to know Sambo kid

  14. #14
    Registered User
    Join Date
    10-19-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    6

    Re: DATEDIF function is not working in Excell 2013

    Where do I indicate or what button do I click for problem solved on this post?

  15. #15
    Registered User
    Join Date
    11-04-2018
    Location
    Kalyan
    MS-Off Ver
    2013
    Posts
    1

    Re: DATEDIF function is not working in Excell 2013

    Change the date format in to DD-MMM-YYYY. 04-Nov-2018.

    It will solve this problem.

    =DATEDIF(X2,Y2,"Y")&"Years"&DATEDIF(X2,Y2,"YM")&"Months"

    This function will cound Years with Months. Like 2Years3Months

  16. #16
    Registered User
    Join Date
    05-12-2020
    Location
    Pietermaritzburg, South Africa
    MS-Off Ver
    2013
    Posts
    1

    Re: DATEDIF function is not working in Excell 2013

    Hi. I tried also several times it was not working in MS Excel 2013, until I used semi columns instead of comas, in the formula's syntax. For the 2013 version, this is the only way. I almost broke my keyboard trying with comas but ....

+ 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. Trim Function not Working in Excel 2013
    By maribeth721 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-03-2017, 12:04 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. Replies: 6
    Last Post: 04-23-2015, 03:55 AM
  4. Use DATEDIF function in getting Age
    By IMA_Saihat in forum Tips and Tutorials
    Replies: 10
    Last Post: 04-10-2015, 01:34 PM
  5. Replies: 2
    Last Post: 11-05-2014, 10:18 AM
  6. Excell function not working
    By pandiarajan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-03-2011, 10:50 AM
  7. DATEDIF function not working for YD in EXCEL2007?
    By Quaisne in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-07-2007, 08:27 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