How to write an `IF` and an `OR` formula

R

Romileyrunner1

Hi,
I want to write the following: (but this doesn`t work)

=IF(H75>1, OR I75<1,"A",(""))

Meaning, If value in H75 >1 OR if value in I75<1, then put in an `A`
otherwise if both statements are false, then leave blank.
Any ideas guys?
Thanks

RR1
 
M

Mike H

Hi,

The correct syntax for or is

=IF(OR(H75>1,I75<1),"A","")

But in your question you say if BOTH are false so do you mean AND

=IF(AND(H75>1,I75<1),"A","")

Mike
 
R

Romileyrunner1

Hi Mike,
I actually mean
"If either are true" then put in an "A" (that is, they don`t have to both be
true)
Thanks RR1
 
J

Jacob Skaria

Bob, from the query I fealt that the OP only seem to have a problem with OR
function. Should have been...Thanks..

=IF(AND(condition1,condition2,...), TRUE statement, FALSE statement)
=IF(OR(condition1,condition2,...), TRUE statement, FALSE statement)
 
B

Bob Phillips

<G> The site looks quite good, but that page was just no help for this
question.

Where are you Jacob, you seem to post quite early my time (UK).
 
R

Romileyrunner1

Still stuck! Can anyone help.
Need to know .....
If either statement is true then put an "A", otherwise leave blank.
Thanks
 
J

Jacob Skaria

Have you tried the below formula Mike has posted ?

=IF(OR(H75>1,I75<1),"A","")

In general

'AND() returns true only if all conditions are satisfied
=IF(AND(condition1,condition2,...), TRUE statement, FALSE statement)

'OR() returns true if any one of the condition is met
=IF(OR(condition1,condition2,...), TRUE statement, FALSE statement)

If this post helps click Yes
 
B

Bob Phillips

No Jacob, this email has stopped delivering some time ago (although oddly I
can send from it!).

Try me on bob at xldynamic dot com (do the obvious).
 

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