+ Reply to Thread
Results 1 to 4 of 4

Struggling with IF rule for Divide by zero error

  1. #1
    Registered User
    Join Date
    11-10-2015
    Location
    Hartlepool, England
    MS-Off Ver
    Excel 2013
    Posts
    2

    Struggling with IF rule for Divide by zero error

    Hi,

    In the attached spreadsheet, I am trying to work out the price of a product after a % discount and a 'buy x get x free' deal.

    In row 3, the product has a 40% discount but no free stock offer, so the net net price (f3) should be £13.89 but because it is trying to divide by zero, I get the error message.

    The formula i have created in rows 4,5,6 works fine but I want to use the same formula for all of column F so if there is no free stock offer, the answer will be what is in column C.

    I hope this makes sense, thanks for looking and I hope someone can help!

    Gareth.

    Excel help.xlsx

  2. #2
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: Struggling with IF rule for Divide by zero error

    simply
    F3 =IFERROR((C3*D3)/(D3+E3),C3)


    Or


    F3 =IF(AND(D3=0,E3=0),C3,(C3*D3)/(D3+E3))
    Last edited by mangesh.mehendale; 11-10-2015 at 06:32 AM.
    Don`t care, take care...

    Regards,
    Mangesh

  3. #3
    Registered User
    Join Date
    11-10-2015
    Location
    Hartlepool, England
    MS-Off Ver
    Excel 2013
    Posts
    2

    Re: Struggling with IF rule for Divide by zero error

    Simple for you, Mangesh! Thanks so much for your quick reply!

  4. #4
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: Struggling with IF rule for Divide by zero error

    Actually want to write simply... anyways ... Please mark this thread as Solved(see at to right "Thread Tools")..

    also "Add Reputation" to the answer if anyone helps you in this forum..

+ 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. Script problem Error in Rule
    By Shakey88 in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2013, 10:17 AM
  2. Copy and Paste Runtime Error - Newbie, really struggling here!
    By lgjmac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2013, 05:43 PM
  3. Divide 0 error
    By mojobaabby in forum Excel General
    Replies: 10
    Last Post: 10-23-2010, 02:59 AM
  4. Indirect validation rule error
    By toclare84 in forum Excel General
    Replies: 7
    Last Post: 10-06-2010, 05:18 AM
  5. Divide by Zero Error
    By AllenMead in forum Excel General
    Replies: 5
    Last Post: 09-22-2010, 08:36 AM
  6. divide zero by zero and not get an error??
    By lc130 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-10-2007, 09:32 PM
  7. divide by zero error
    By schlicken in forum Excel General
    Replies: 2
    Last Post: 05-23-2007, 04:17 PM
  8. Divide by zero error
    By gregmosu in forum Excel General
    Replies: 1
    Last Post: 06-30-2006, 12:10 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