function with IF, OR, & AND

T

Trishcuria

I have the following as an example

A B C

1 0 5
2 0 0

I need a formua which will return in column C the following:

If a & b are both equal to zero, then "" (blank), but if a is equal to 0 and
b is greather than zero, then C needs to equal 125%.

I cant seem to be able to combine both of these elements into one formual
 
L

Luke M

And what happens if neither of those criteria are met?

=IF(AND(A2=0,B2=0),"",IF(AND(A2=0,B2>0),125%,"Criteria not met"))
 
M

Mike H

Maybe this formatted as %

=IF(AND(A1=0,B1=0),"",IF(B1-A1=B1,1.25,""))

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
J

Joe User

Trishcuria said:
I need a formua which will return in column C
the following:
If a & b are both equal to zero, then "" (blank),
but if a is equal to 0 and b is greather than zero,
then C needs to equal 125%.

=if(a1=0, if(b1>0, 125%, ""), "")

formatted as Percentage.

Note that this also returns blank when A1 is not zero, regardless of what B1
is. You neglect to explain what you want in that case.


----- original message -----
 

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