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.

Use Multiple IF Conditions in Nested Form in Excel

  • 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.

Use Multiple IF Conditions in Nested Form in Excel

  • 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.

Read More: VBA IF Statement with Multiple Conditions in Excel


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 he obtains marks greater than or equal to 40 in both subjects.

Apply IF Conditions with AND Logic

  • 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.

Apply IF Conditions with AND Logic

  • 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.

Read More: IF with AND in an Excel Formula 


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.

OR Logic with IF Condition

  • Select cell E6.
  • Enter the following formula:

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

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

OR Logic with IF Condition

  • 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.

Insert Both AND & OR Logic with Multiple IF Conditions

  • 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.

Insert Both AND & OR Logic with Multiple IF Conditions

  • 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.

Apply Multiple IF Conditions with Different Excel Functions

  • 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.

Apply Multiple IF Conditions with Different Excel Functions

  • 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.

Read More: VBA IF Statement with Multiple Conditions in Excel


Download Practice Workbook

You can download the practice workbook from here:


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

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

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo