+ Reply to Thread
Results 1 to 6 of 6

Dividing by zero

  1. #1
    Registered User
    Join Date
    08-08-2005
    Posts
    12

    Dividing by zero

    I made a template where one column is to display the result of a formula of numbers entered into other columns. The formula contains a division, which prompts the result cell to display #DIV/0! until a number is entered into the cell that corresponds with the denominator in the formula. Although it doesn't affect the functionality of the template, I don't want the result column to show #DIV/0! if the denominator cell is blank. Is there a way to do this?

    Thanks in advance!
    Excel 2003

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451
    You can wrap your formula in an IF() function

    Try this:

    =IF(ISERR(your formula),"",your formula)

    This will show a blank cell if your formula returns any error and shows a value if your formula returns anything other than an error

  3. #3
    Registered User
    Join Date
    08-08-2005
    Posts
    12

    Thanks!

    I put it in and it worked perfectly.

    Much appreciation for your help!

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451
    You're quite welcome. Glad to help.

    I should have added an extra note: The formula I gave you will result in a blank for all errors except the #N/A error. If you have trouble with that one as well then change the formula to be ISERROR instead of ISERR.

  5. #5
    Registered User
    Join Date
    08-08-2005
    Posts
    12

    Noted

    I'll keep that one in mind if the problem ever occurs.

    Thanks again!

  6. #6
    manxman
    Guest

    RE: Dividing by zero

    In the formula cell direct no entry at all until there is a number in the
    denominator cell by entering this assume the denominator cell is A1.
    =if(A1="","",B1/A1).

    "careyc" wrote:

    >
    > I made a template where one column is to display the result of a formula
    > of numbers entered into other columns. The formula contains a division,
    > which prompts the result cell to display #DIV/0! until a number is
    > entered into the cell that corresponds with the denominator in the
    > formula. Although it doesn't affect the functionality of the template,
    > I don't want the result column to show #DIV/0! if the denominator cell
    > is blank. Is there a way to do this?
    >
    > Thanks in advance!
    > Excel 2003
    >
    >
    > --
    > careyc
    > ------------------------------------------------------------------------
    > careyc's Profile: http://www.excelforum.com/member.php...o&userid=26064
    > View this thread: http://www.excelforum.com/showthread...hreadid=523709
    >
    >


+ 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