How can I enter multiple conditions into my formula! (And or condition)

We can do this in excel with two different formulas:

  • AND: determine if all conditions in a test are TRUE
  • OR: determine if any condition in a test is TRUE

Syntax

=AND(condition_one, condition_two)
=OR(condition_one, condition_two)

Example

Let’s use an example to illustrate the formulas. We will check if our number/colour are equal to 1/Red (the black cells).

  • Using our AND formula we check if both of our conditions are TRUE
  • Using our OR formula we check if either of our conditions are TRUE

The Steps

condition_one: Number = 1 (logical 1)

condition_two: Colour = Red (logical 2)

AND

TRUE (AND)

If both of our conditions are TRUE, we will get TRUE as our result

Our 1st condition is TURE, 1=1

=AND(1 = 1

Our 2nd condition is TRUE, Red=Red

=AND(1 = 1, Red = Red)
TRUE RESULT (AND)

formula

=AND(B3=F3,D3=F4)

ouput

And there you have it, both our conditions are TRUE!

FALSE (AND)

In order to get a FALSE result at least one condition must be FALSE

Our 1st condition is FALSE, 1≠3

=OR(3 = 1, Red = Red)
FALSE RESULT (AND)

formula

=AND(B5=F3,D3=F4)

output

And there you have it, one of our conditions is FALSE!

OR

TRUE (OR)

If one of our conditions is TRUE, we will get TRUE as our result

Our 1st condition is TURE, 1=1

Our 2nd condition is FALSE, Red ≠ Blue

TRUE RESULT (OR)

formula

=OR(B3=F3,D3=F4)

output

And there you have it, at least one of our conditions is TRUE!

FALSE (OR)

In order to get a false result both our conditions must be FALSE

We have set both conditions to be FALSE, 1≠3 and Red ≠ Blue

FALSE RESULT (OR)

formula

=OR(B5=F3,D5=F4)

output

And there you have it, both of our conditions are FALSE!

Try making the formula more readable by naming ranges