+ Reply to Thread
Results 1 to 6 of 6

Formula to Return Blank Instead of Div Error

  1. #1
    Registered User
    Join Date
    08-31-2019
    Location
    london
    MS-Off Ver
    office 2013
    Posts
    4

    Formula to Return Blank Instead of Div Error

    Hi,
    I m having some trouble solving that DIV0 error, I checked different examples but cant find out how to solve it

    = IF(E17="LONG",((I17-G17)/G17),ABS(I17-G17)/G17)

    I get a DIV0 when the E17 is blank
    I d like excel to return 0 if E17 is blank, if you have any idea :

    Cheers
    Last edited by AliGW; 08-31-2019 at 10:48 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Div0

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new, I will change it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Formula to Return Blank Instead of Div Error

    Try this:

    =IFERROR(IF(E17="LONG",((I17-G17)/G17),ABS(I17-G17)/G17),0)

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to Return Blank Instead of Div Error

    The #DIV/0 ! will occur when G17 is blank - or zero, it's nothing to do with E17.

    Depending on what you're trying to achieve you should either ensure G17 is never blank or wrap the formula in an =IFERROR() function.
    i.e.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    08-31-2019
    Location
    london
    MS-Off Ver
    office 2013
    Posts
    4

    Re: Formula to Return Blank Instead of Div Error

    thank you for the help, I was using IFERROR withhout the second IF

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Formula to Return Blank Instead of Div Error

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. #/div0 error
    By rydergrove in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-29-2013, 09:36 AM
  2. #div0!
    By RMGraham in forum Excel General
    Replies: 6
    Last Post: 08-21-2012, 08:03 PM
  3. Cuting a col and then moving it causes div0
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-29-2011, 10:43 PM
  4. Hide #DIV0! With a formula
    By djfatboyfats in forum Excel General
    Replies: 2
    Last Post: 01-05-2010, 10:40 AM
  5. DIV0 error
    By spreadgeek in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-10-2008, 11:41 AM
  6. I WANT TO HIDE THIS #DIV0!
    By HERNAN in forum Excel General
    Replies: 9
    Last Post: 07-26-2006, 02:35 PM
  7. #DIV0/! issues
    By Brento in forum Excel General
    Replies: 2
    Last Post: 02-02-2006, 03:55 AM
  8. Excel - IF Formula and #DIV0!
    By Newsgal in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-25-2005, 08:13 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