# How to Use an IF Function with 3 Conditions in Excel

In this tutorial, you will learn how to use an IF function with 3 conditions in Excel.

The IF function in Excel performs a logical test and outputs two values: one for a TRUE outcome and another for a FALSE outcome. For instance, the formula for “passing” is =IF(A1>40,”Pass”,”Fail”). By nested IF functions, several conditions can be examined. The logical test can be extended by combining the IF function with other logical operations like AND and OR.

Once ready, we’ll get started by utilizing real-world examples to show you how to use an IF function with 3 conditions in Excel.

## Anatomy of IF, AND & OR Function

### IF Function

=IF(logical_test, value_if_true, value_if_false)

The Excel IF Statement evaluates a specified condition and outputs two valuesâ€”one for a TRUE outcome and another for a FALSE one.

### AND Function

When all of its parameters are evaluated as TRUE, the AND function returns TRUE; otherwise, it returns FALSE.

### OR Function

If any of its parameters are evaluated as TRUE, the OR function returns TRUE; otherwise, it returns FALSE.

## Use an IF Function with 3 Conditions in Excel

Before we begin we will need a group of data to use an IF function with 3 conditions in Excel.

### Step 1

First, you need to have a clean and tidy group of data to work with.

### Step 2

In this example, we want to find out if the students have passed or failed any of the exams for the year. To do that, we will be using the IF function together with the AND function to make sure if any of the exams scores lower than 40 marks, the indicator will return a â€˜Failâ€™. We will insert this formula =IF(AND(B2>=40, C2>=40, D2>=40), “Pass”, “Fail”).

### Step 3

Once you are done, apply the same formula to the rest of the data and your Excel will look like this.