+ Reply to Thread
Results 1 to 4 of 4

#DIV/0! to disappear

  1. #1
    Registered User
    Join Date
    01-21-2009
    Location
    Cyprus
    MS-Off Ver
    Excel 2007
    Posts
    8

    #DIV/0! to disappear

    I am building a model and some input data is still missing. Given that some calculations are performed with these data, excel returns #DIV/0! (where input cell is blank or 0).

    Is there a way to disappear these #DIV/0! given that I would like to have my formulae in place as new input data may evolve in the future?

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: #DIV/0! to disappear

    It is best to setup your formulae such that they do not try to divide is divisor is zero, eg:

    =IF(N(B1),A1/B1,"")

    So if B1 is 0 or text etc a Null value "" is returned, only if B1 were numeric and anything other than zero would the division be processed.

  3. #3
    Registered User
    Join Date
    01-21-2009
    Location
    Cyprus
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: #DIV/0! to disappear

    Excellent!. Thank you very much.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: #DIV/0! to disappear

    I just noticed you're running Excel 2007 in which case you can in fact use:

    =IFERROR(A1/B1,"")

    Change the Null ("") to be whatever you want returned if the preceding calculation results in an error.

    NOTE: this function is not backwards compatible so if you ever need to run the spreadsheet on an earlier version you should use the approach mentioned in the first post.

+ 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