Thread: Formula Error
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Formula Error

To properly define this, need to know all the possible outcomes. So far, the
only two outcomes are 100% if A9 =0, else do the formula C9/A9 -1. If this is
true, your formula can be condensed to:
=IF(A9=0,"100%",C9/A9-1)

What I believe is causing confusion is if the value of C9 makes a difference
in what happens. In which case, formula would be something like:
=IF(A9=0,"100%",IF(Some_Check,C9/A9-1,Other_Possible_Result))

for a guess as to what you'd need, based on the statement about growth:
=IF(A9=0,IF(C9=0,"100%","-100%"),C9/A9-1)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Curtis" wrote:

Thanks

SO what can I do in those cases where a9=0 I am calculating growth and if
a9=0 and c90 then I need to show growth (100%)rather than the error

"Luke M" wrote:

If A9 = 0, but C9<=0, then you are doing the math operation of C9/A9. (which
leads to division by zero).

Note also that the first part of your formula checks if C9=0 and A90, and
if true, to do C9/A9-1. This will always results in -1!

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Curtis" wrote:

Why am I getting an error #DIV/0!

Note
a9=0
c9=0

=IF(AND(A90,C9=0),C9/A9-1,IF(AND(A9=0,C90),"100%",C9/A9-1))

Thanks