If then AND statements in access

  • Thread starter Thread starter Sarah
  • Start date Start date
S

Sarah

I am trying to convert this excel IF statement into access.

=IF(A2<-10,"OK",IF(AND(@240<-5,B2="Y"),"OK","Not OK"))

How would I write this in access?
 
I am trying to convert this excel IF statement into access.

=IF(A2<-10,"OK",IF(AND(@240<-5,B2="Y"),"OK","Not OK"))

How would I write this in access?

Oops - This is what the statement is..
 
Well there aren't any cells like B2 in Access. We would need the field names.

Also it would help if you showed us some sample data and what you would like
the result to look like.
 
Hi Sarah,

This would be an equivalent:

=IIf(A2<-10,"OK",IIf(A2<-5 AND B2="Y","OK","Not OK"))

Or this:

=IIf(A2<-10 OR (A2<-5 AND B2="Y"),"OK","Not OK")

Clifford Bass
 

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

Back
Top