Formula Modification

P

Phil Hageman

This formula works okay when cell U51 is either blank or
with data greater than zero; however, I now need to modify
the formula for the case when cell U51 has a zero posted
in it - so it returns a zero answer - with the other
features still intact.

=IF(U51<>0,(U51-V42)/(P42-V42),"")
 
E

Edwin Tam (MS MVP)

Your question is unclear as you missed two cases

What do you want when
1) U51<0 (negative value
1) U51 is not blank and not numeric. For example, U51 contains tex

Besides, your formula is wrong because you said the result is ok when
1) U51 greater than zero; an
2) U51 is blank

But your formula also deals with value smaller than zero
You should use U51>0 instead of U51<>0

Please give more details. Thanks
 
T

Tom Ogilvy

If you are happy with it now, this should do what you want:

=IF(U51<>0,(U51-V42)/(P42-V42),IF(U51="","",IF(U51=0,0,"")))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top