+ Reply to Thread
Results 1 to 7 of 7

Possible to return a different value if #DIV/0! is shown?

  1. #1
    Registered User
    Join Date
    04-28-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    26

    Possible to return a different value if #DIV/0! is shown?

    I have some formulas set up in a spreadsheet, and one of the columns is simply column g (for that row) divided by column d (for that row). In some cases, g and d are both 0 which results in #DIV/0! Is there anything that I can add to my simple g1/d1 formula that would return a difference cell's value instead if the result was #DIV/0! ?

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Possible to return a different value if #DIV/0! is shown?

    =IF(ISERROR(G1/D1),cell_you_want_to_reference,G1/D1)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Possible to return a different value if #DIV/0! is shown?

    Use this formula to hide error

    =IFERROR(G1/D1,0)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: Possible to return a different value if #DIV/0! is shown?

    =if(D1=0,"return a difference cell's value",G1/D1)

  5. #5
    Registered User
    Join Date
    12-30-2011
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Possible to return a different value if #DIV/0! is shown?

    Hi there,

    You could try:

    =IFERROR(G1/D1,[whatever you want returned instead of #DIV/0])

    HTH,

    FR

  6. #6
    Registered User
    Join Date
    04-28-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Possible to return a different value if #DIV/0! is shown?

    Have used several of these, thanks!

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Possible to return a different value if #DIV/0! is shown?

    You're welcome and thank you for the feedback!

+ 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] Return the value shown in based on a date range
    By tsmor in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-03-2012, 11:47 AM
  2. Named Ranges shown (or not shown) as blue means what?
    By wdeleo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. Named Ranges shown (or not shown) as blue means what?
    By wdeleo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  4. Named Ranges shown (or not shown) as blue means what?
    By wdeleo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. [SOLVED] Named Ranges shown (or not shown) as blue means what?
    By wdeleo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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