How to Excel: Use an IF Function with 5 Conditions

IF functions allow you to perform logical tests on data and return different results based on the outcome of the test. A function with 5 conditions will evaluate the data against 5 different criteria and return a result accordingly. To use it, you must specify the criteria and the values to return if it meets or doesn’t meet the criteria. This is an excellent way to quickly manipulate data in Excel and get the results you need.


You can use the following formulas to create an IF function with 5 conditions in Excel:

Method 1: Nested IF Function

=IF(C2<15,"F",IF(C2<20,"E",IF(C2<25,"D",IF(C2<30,"C",IF(C2<35,"B", "A")))))

Method 2: IF Function with AND Logic

=IF(AND(A2="Mavs", B2="Guard", C2>20, D2>4, E2>2), "Yes", "No")

Method 3: IF Function with OR Logic

=IF(OR(A2="Mavs", B2="Guard", C2>20, D2>4, E2>2), "Yes", "No")

The following examples show how to use each formula in practice with the following dataset in Excel:

Example 1: Nested IF Function

We can type the following formula into cell F2 to return a ranking tier value of A through F based on the value for each player in the Points column:

=IF(C2<15,"F",IF(C2<20,"E",IF(C2<25,"D",IF(C2<30,"C",IF(C2<35,"B", "A")))))

We can then drag and fill this formula down to each remaining cell in column E:

Here’s what this formula did:

  • If the value in the Points column is less than 15, return F.
  • Else, if the value in the Points column is less than 20, return E.
  • Else, if the value in the Points column is less than 25, return D.
  • Else, if the value in the Points column is less than 30, return C.
  • Else, if the value in the Points column is less than 35, return B.
  • Else, return A.

Example 2: IF Function with AND Logic

=IF(AND(A2="Mavs", B2="Guard", C2>20, D2>4, E2>2), "Yes", "No")

We can then drag and fill this formula down to each remaining cell in column E:

Here’s what this formula did:

  • If the value in the Team column was “Mavs” and the value in the Position column was “Guard” and the value in the Points column was greater than 20 and the value in the Assists column was greater than 4 and the value in the Steals column was greater than 2, return Yes.
  • Else, if at least one condition is not met then return No.

Example 3: IF Function with OR Logic

We can type the following formula into cell F2 to return “Yes” if at least one of five conditions are met for a specific player or “No” if none of the conditions are met:

=IF(OR(A2="Mavs", B2="Guard", C2>20, D2>4, E2>2), "Yes", "No")

We can then drag and fill this formula down to each remaining cell in column E:

Here’s what this formula did:

  • If the value in the Team column was “Mavs” or the value in the Position column was “Guard” or the value in the Points column was greater than 20 or the value in the Assists column was greater than 4 or the value in the Steals column was greater than 2, return Yes.
  • Else, if none of the conditions are met then return No.

x