+ Reply to Thread
Results 1 to 5 of 5

Help to remove #DIV/0! error

  1. #1
    Registered User
    Join Date
    05-26-2009
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    99

    Help to remove #DIV/0! error

    I have the following formula, that i need to remove a possibility of a divide by zero error

    =IF(K9 <> 0, (K9-K8)/K8, 0)

    The IF function was my attempt (so the only formula i need is (K9-K8)/K8), but it doesnt work for the first value in the column, this is where i get the #div/0! error (for example when k8 hasn't got a value)

    any help greatly appreciated.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Help to remove #DIV/0! error

    =IF(AND(K9 <> 0,K8<>0), (K9-K8)/K8, 0) is one way
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-26-2009
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Help to remove #DIV/0! error

    thanks, this works pefectly.

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Help to remove #DIV/0! error

    Hi,
    using the forum's search function will probably give you a dozen of other options

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,111

    Re: Help to remove #DIV/0! error

    Also, no need to check K9, only K8

    =IF(K8, K9/K8-1, 0)
    Never use Merged Cells in Excel

+ 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