# How to Use Multiple IF Conditions in Excel (3 Examples)

### Example 1 – Nested IF Conditions

Weâ€™ll apply a nested formula to handle multiple IF conditions in Excel.

Consider a dataset where we want to set the grades for different students based on their total marks.

• To begin with, select cell F6.
• Enter the following formula:
`=IF(E6>160,"A",IF(E6>=150,"B",IF(E6>140,"C",IF(E6>130,"D",IF(E6<130,"F")))))`
• Press Enter.
• The value AÂ will appear in cell F6.

• Drag the Fill Handle tool from cell F6 to F10 to apply the formula to other cells.
• The resulting grades for all students will be displayed.

Here,

The formula that we used returns:

• Grade value A if total marks are greater than or equal to 160
• Grade value B if the total mark is greater than or equal to 150
• Grade value C if the total mark is greater than or equal to 140
• Grade value D if the total mark is greater than or equal to 130
• Grade value F if the total mark is smaller than 130.

### Example 2 – Multiple IF Condition in Excel with Logical Test

#### 2.1Â AND Logic withÂ IF Conditions

Letâ€™s apply multiple IF conditions with the AND function.

Suppose we have a dataset where a student passes if they obtain marks greater than or equal to 40 in both subjects.

• Select cell E6.
• Enter the following formula:
`=IF((AND(C6>=40, D6>=40)), "Pass", "Fail")`
• Press Enter.
• The output PassÂ will appear in cell E6.

• Drag the Fill Handle tool from cell E6 to E10 to fill down the formula.
• The Pass/Fail status for each student will be displayed.

Here, the formula returns Pass if both conditions are true otherwise it will return Fail.

#### 2.2 OR Logic with IF Condition

Letâ€™s apply the OR function with multiple IF conditions.

Consider a dataset where a student fails if they get less than or equal to 40 marks in any one subject.

• Select cell E6.
• Enter the following formula:

`=IF((OR(C6<=40, D6<=40)), "Fail", "Pass")`

• Press Enter.
• The output will appear in cell E6.

• Drag the Fill Handle tool from cell E6 to E10 to fill down the formula.
• The Pass/Fail status for each student will be displayed.

Here, the formula that we used returns Fail if any given condition is true otherwise it will return Pass.

#### 2.3 Combining AND & OR Logic with Multiple IF Condition

Letâ€™s use multiple IF conditions with both AND and OR functions.

• Select cell E6.
• Enter the following formula:
`=IF(OR(AND(C6>=40, D6>=50), AND(C6>=35, D6>=45)), "Pass", "Fail")`
• Press Enter.
• The formula will return the value Pass in cell E6.

• Drag the Fill Handle tool from cell E6 to E10 to fill down the formula.
• The Pass/Fail status for each student will be displayed based on the combined conditions.

Here,

The formula returns:

• Pass if the value in cells C6 & D6 is respectively >=40 & >=50 or
• Pass if the value in cells C6 & D6 is respectively >=35 & >=45.

Any value that doesn’t meet the above conditions will return the value Fail.

Read More:Â Excel IF Function with 3 Conditions

### Example 3 – Apply Multiple IF Conditions with Different Excel Functions

Until now, weâ€™ve explored how to use multiple IF conditions in Excel with AND/OR functions. In this example, weâ€™ll learn how to combine multiple IF conditions with another function. Consider the following dataset, which contains marks for three students in five subjects. Our goal is to set the status of each student based on their total marks. To achieve this, weâ€™ll use the SUM function.

• Select cell C11.
• Enter the following formula in that cell:
`=IF(SUM(C6:C10)>=350, "Good", IF(SUM(C6:C10)>=300, "Satisfactory", "Poor "))`
• Press Enter.
• The formula returns the value Good in cell C11.

• Drag the Fill Handle tool horizontally from cell C11 to E11.

Here,

the formula returns:

• The value Good if the value of SUM(C6:C10) is greater than or equal to 350.
• The value Satisfactory if the value of SUM(C6:C10) is greater than or equal to 300.
• The value Poor if the value of SUM(C6:C10) is less than 300.

## Multiple IF Condition in Excel: Knowledge Hub

<< Go Back to Excel IF Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mukesh Dipto

Mukesh Dipto is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including Rhino3D, Maxsurf C++, AutoCAD, HTML, CSS, JavaScript, and WordPress. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF