If...and... - can never get the syntax correct!

D

Darin Kramer

Howdie

Spreadsheet 1 columns and 2 rows.
In A2, either a yes or no
In A3 either a yes or no
I need to put in A4 formulae that will tell me:
If a2 = a3 are equal,put "okay".
If a2 = No, and a3 = yes, Put "problem"
If a2 = Yes and a3 = No, put "okay"

Thanks so much

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
J

JulieD

Hi Darin

=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay",IF(AND(A2="No",A3="Yes"),"problem","not
sure"))

Cheers
JulieD
 
B

Bob Phillips

Hi Julie,

The not sure condition can never be met as stated by OP, you just need

=IF(OR(A2=A3,AND(A2="Yes",A3="No")),"okay","problem")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
C

Charlie

I don't think it needs to be that complex, as long as A2 and A3 MUST contain
either "Yes" or "No". If A2="Yes" it doesn't matter what's in A3.
 
B

Bob Phillips

or even

=IF(OR(A2=A3,A2="Yes),"okay","problem")


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
J

JulieD

if one of A2 or A3 DOESN'T contain either Yes or No and the one other does,
you get a false result .... can we "assume" that both will be filled with
only these values? - maybe the OPs cells to check at BA23 and AL1245 ... and
they want to know the result in A1.

anyway, the OP can choose which one to use
 
J

JulieD

Hi Bob

the "not sure" condition can be met under the following circumstances
AND(A2="No", A3="")
AND(A2="No",A3="Yes ")
AND(A2=" ",A3="No")

etc .... as we don't know the "real" range that the OP is going to apply the
solution to i thought it prudent to check that they only get the requested
result when the data matches what they asked for.

anyway the OP can decide which formula to use :)

Cheers
JulieD
 
B

Bob Phillips

Hi Judie,


the "not sure" condition can be met under the following circumstances
AND(A2="No", A3="")
AND(A2="No",A3="Yes ")
AND(A2=" ",A3="No")

as I said, as stated by the OP ...

In A2, either a yes or no
In A3 either a yes or no
anyway the OP can decide which formula to use :)

Well, he has few choices :)
 

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