"or" formula

B

Bryan

Hi all,
I have a formula I am using now to calculate efficiency(%) as follows:
=IF(E4="","",(E4*F4)/C4)
E4 picks up its value from another sheet in the workbook. I am (usually)
given the amount of time we have to accomplish a task. So, if I have a value
in E4, then H4, (where this formula resides,) will calculate and load an
efficiency %. It works great as long as I have a value or a value >0. What
I need to happen is, if there is a zero or null value in E4 producing a 0% in
H4, then I need H4 to default to 100%. Any ideas on how I can do that. I've
tried several things, but when my formula doesn't just point and laugh, it
tells me that I have a data type mismatch!!
TIA,
Bryan
 
L

Lars-Åke Aspelin

Hi all,
I have a formula I am using now to calculate efficiency(%) as follows:
=IF(E4="","",(E4*F4)/C4)
E4 picks up its value from another sheet in the workbook. I am (usually)
given the amount of time we have to accomplish a task. So, if I have a value
in E4, then H4, (where this formula resides,) will calculate and load an
efficiency %. It works great as long as I have a value or a value >0. What
I need to happen is, if there is a zero or null value in E4 producing a 0% in
H4, then I need H4 to default to 100%. Any ideas on how I can do that. I've
tried several things, but when my formula doesn't just point and laugh, it
tells me that I have a data type mismatch!!
TIA,
Bryan


Try this formula:

=IF(OR(E4="",E4=0),1,(E4*F4)/C4)

Hope this helps / Lars-Åke
 

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