+ Reply to Thread
Results 1 to 7 of 7

Adding IFERROR to a formula to get rid of #####

  1. #1
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Adding IFERROR to a formula to get rid of #####

    I am calculating time elapsed by subtracting one set of date/time from another, but when one of more of the cells for the date/time are blank, I want to return a blank in the time elapsed cell instead of the ####### that is currently populated. Below is an example of the formula that I am currently using.

    =((N2+O2)-(D2+E2))

    I have tried adding IFERROR several ways and have not figured out how to get this to work. Of course, I know that I also need to add ,"" somewhere along the line.

  2. #2
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Adding IFERROR to a formula to get rid of #####

    It's because if I recall correctly, ####### is not an error. Could it be that the number is too big to be displayed?

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

    Re: Adding IFERROR to a formula to get rid of #####

    You're right Jdevil, ####### is NOT an error.
    It means either the value is too long to display in the available width of the cell, OR
    It's a Negative Time Value (Excel doesn't understand negative time, there's no such thing since we can't go backwards in time).
    I think it's the negative time issue since the OP says the calculation is for elapsed time.

    So to make it return blank instead, Try
    =IF((N2+O2)-(D2+E2)<0,"",(N2+O2)-(D2+E2))

  4. #4
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Adding IFERROR to a formula to get rid of #####

    Thank you - Jonmo1, the formula you provided works! I don't think I stated that the ##### was an error, but I guess it was implied when I was trying to use the IFERROR.
    Thanks again!

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

    Re: Adding IFERROR to a formula to get rid of #####

    You're welcome.

    I did just notice that you said
    but when one of more of the cells for the date/time are blank
    That isn't necessarily the same as if the resulting calculation is negative. Which is what the formula I posted tests for.

    To test specifically for 1 or more of the cells being blank, try
    =IF(COUNT(D2,E2,N2,O2)=4,(N2+O2)-(D2+E2),"")

  6. #6
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Adding IFERROR to a formula to get rid of #####

    Thank you again. I tried your "new" formula, but the first formula you provided was the one that actually worked/works.

    I am calculating how long it takes someone to respond to a service call. So the call is made at date (D2) and time (E2) and the person arrives at date (N2) and time (O2). Sometimes they forget to put the call time/date or the arrive time/date in the log. As I drag the formula down all of the rows, what was happening was that if any of those four cells were blank the result would be ######, etc. With the first formula, if one of those four cells are empty, it leaves the calculated cell (time elapsed) blank, and still correctly calculates time elapsed for the other rows where all four cells are populated.

    Hope this makes sense! Thanks again

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

    Re: Adding IFERROR to a formula to get rid of #####

    You're welcome.

+ 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. [SOLVED] Help on adding an IFERROR/IF function to an existing formula.
    By Albert Dirk in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-23-2016, 07:16 AM
  2. Replies: 3
    Last Post: 01-13-2016, 12:05 PM
  3. [SOLVED] Adding IFERROR IF MATCH Formula to each row
    By MICowboy13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2014, 02:47 PM
  4. [SOLVED] Adding IFERROR into macro
    By Slinky84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2014, 03:59 PM
  5. Adding IFERROR to INDEX MATCH
    By brad999 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-06-2013, 04:18 AM
  6. Help adding Iferror to existing formula
    By rwmeis in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2013, 12:33 PM
  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