Announcement

Collapse
No announcement yet.

If error

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • If error



    Hi,

    Hope someone can help, this has got me going around in circles. Please see table below:
    Apples Pears Proportion of Apples to Pears (%)
    10 0 0
    Under Proportion of Apples to Pears (Cell C2) I have put this formula:

    =IF(ISERROR(A2/B2),0,A2/(A2+B2))

    It should come back with the answer 100% but it comes back as 0.

    I wish to keep the IF ERROR in the formula because if there are 0 Apples and 0 Pears I want it to still return a 0 rather than a #DIV/0 error.

    Can someone help?

  • #2
    try this:

    Code:
      =IF(AND(A2=0,B2=0),0,IF(ISERROR(A2/B2),1,A2/(A2+B2)))
    note: cell c2 formatted as %

    Comment


    • #3


      Originally posted by rabsofty View Post
      try this:

      Code:
      =IF(AND(A2=0,B2=0),0,IF(ISERROR(A2/B2),1,A2/(A2+B2)))
      note: cell c2 formatted as %
      Yes!!!!

      That did it.

      Thank you very much.

      Comment

      Working...
      X