+ Reply to Thread
Results 1 to 7 of 7

Help with IFERROR and DATEEDIF showing 117 instead of 0

  1. #1
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Help with IFERROR and DATEEDIF showing 117 instead of 0

    Hello,

    I have the following formula:

    =IFERROR(DATEDIF(M17,TODAY,"y"),0)

    This works great if there is date in M17, however I would like it to show a 0 if there is no date in M17 instead of the number 117. The column is formatted as a number.

    Oh and the "TODAY" is a name reference to a cell.

    Thanks
    Last edited by rhett7660; 09-07-2017 at 04:56 PM. Reason: Solved

  2. #2
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Help with IFERROR and DATEEDIF showing 117 instead of 0

    Try this formula
    =IF(OR(Today="",M17=""),0,DATEDIF(M17,Today,"y"))

  3. #3
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Re: Help with IFERROR and DATEEDIF showing 117 instead of 0

    Quote Originally Posted by Syrkrasi View Post
    Try this formula
    =IF(OR(Today="",M17=""),0,DATEDIF(M17,Today,"y"))
    I am testing this out right now.

  4. #4
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Re: Help with IFERROR and DATEEDIF showing 117 instead of 0

    Ok, I have a data validation rule set to the column (sorry forgot to mention that) with the following parameter:

    Whole Number

    between

    Minimum - 0
    Maximum - 200

    So when I use the above formula I get the error message "the value you entered...". I have checked and unchecked the ignore blank which hasn't helped.

    I did this data validation because I was getting items entered that were not correct.

  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: Help with IFERROR and DATEEDIF showing 117 instead of 0

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.
    If posting code please use code tags, see here.

  6. #6
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    484

    Re: Help with IFERROR and DATEEDIF showing 117 instead of 0

    Quote Originally Posted by rhett7660 View Post
    ... I have the following formula:

    =IFERROR(DATEDIF(M17,TODAY,"y"),0)

    This works great if there is date in M17, however I would like it to show a 0 if there is no date in M17 instead of the number 117. The column is formatted as a number...
    Maybe

    =IFERROR(DATEDIF(1/(1/M17),TODAY,"y"),0)

  7. #7
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Re: Help with IFERROR and DATEEDIF showing 117 instead of 0

    Quote Originally Posted by Norie View Post
    Any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.
    It looks like Root_ suggestion worked out.

+ 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. Cell with Formula Not Showing Date - Only Showing Serial Number
    By jbb89777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-07-2016, 04:33 AM
  2. Replies: 2
    Last Post: 04-22-2016, 05:25 PM
  3. [SOLVED] Multiple IFERROR or IFERROR w/ If Statements
    By SanchoPanza1 in forum Excel General
    Replies: 4
    Last Post: 03-31-2016, 08:09 PM
  4. [SOLVED] IFERROR(MATCH & IFERROR(SMALL Help Needed
    By chad328 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-17-2016, 06:34 AM
  5. IFERROR within IFERROR until no error. Help.
    By XNemo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-26-2014, 12:30 PM
  6. [SOLVED] Use of IFERROR to include showing blanks when certain criteria is met
    By gruss in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 11:08 AM
  7. xlfn.IFERROR or IFERROR don't work in Excel 98-2003
    By dj_danu01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2013, 02:53 AM

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