View Full Version : IF OR AND combination


scott-atkinson
12-28-2007, 01:40 AM
Guys,

Is there a way that I can combine together a IF OR AND statement, and if so how?

wazz
12-28-2007, 01:58 AM
IF x=y OR x=z AND y=n then...

include x= with each OR statement. IF x=y OR z AND y=n then... will not work.

scott-atkinson
12-28-2007, 02:22 AM
IF x=y OR x=z AND y=n then...

include x= with each OR statement. IF x=y OR z AND y=n then... will not work.

Sorry Wazz,

I do not understand, let me explain what I am trying to do.

Column 1 has text..."Sample Received", "Sample Approved" etc...
Column 2 has a date field.

I am trying to create a statement like this

If Col 1 <> sample received, or Col 1 <> Sample Approved, and Col 2 is < todays date, then "Chase sample".

How would I achieve this?

Thanks for your help.

Brianwarnock
12-28-2007, 03:12 AM
You have to correctly bracket your ANDs and ORs

if cols A and B have values then col C could have

=IF(AND(OR(A1="x",A1="Y"),B1="Z"),"TRUE","FALSE")

Brian