If | And | Or | Not

Learn how to use Excel's logical functions, such as IF, AND, OR, and NOT.

If

The IF function checks if a condition is met and returns one value if true and another value if false.

For example, take a look at the IF function in cell C2 below.

picture

Description: If the score is greater than or equal to 60, the IF function will return pass, otherwise it will return fail.

And

The AND function returns TRUE if all conditions are true; it returns FALSE if any condition is false.

For example, look at the AND function in cell D2 below.

picture

Explanation: If the first score is greater than or equal to 60 and the second score is greater than or equal to 90, the AND function returns TRUE, otherwise it returns FALSE.

Or

The OR function returns TRUE if any condition is TRUE; it returns FALSE if all conditions are false.

For example, take a look at the OR function in cell D2 below.

picture

Description: The OR function returns TRUE if at least one score is greater than or equal to 60, otherwise returns FALSE. Visit our page on OR functions for more examples.

Not

The NOT function changes TRUE to FALSE and FALSE to TRUE.

For example, look at the NOT function in cell D2 below.

picture

Explanation: In this example, the NOT function reverses the result of the OR function.