# How to use the IF function for multiple ranges with multiple conditions

Microsoft Excel is a spreadsheet software program developed by Microsoft Corporation. It is used for organizing, analyzing and manipulating data. With its intuitive interface and powerful calculation tools, Excel is widely used in both personal and professional settings for tasks such as budgeting, financial analysis, and data management. Additionally, it offers a variety of charts, graphs and visualizations to help users better understand their data. With its versatility and ease of use, Microsoft Excel has become a staple tool for many businesses and individuals worldwide.

In this tutorial we will learn how to use the IF function between multiple ranges in Microsoft Excel.The IF function in Microsoft Excel is a powerful tool that allows you to make logical comparisons between values and take actions based on the result. In its simplest form, the IF function tests one or multiple conditions and returns one value if the condition is true and another value if it is false.

## Step 1 – Select a Blank Cell

• Select a blank targeted cell where you want the results to be.

## Step 2 – Place an equals sign

• Place an Equals sign (=) in the targeted cell.

## Step 3 – Use the IF and AND function

• We can use the IF function for multiple conditions by combining it with the AND function.
• The AND functions return the first value when all the conditions are true and the second value if any of the conditions is false.
• Combining IF and AND function the Syntax is

IF(AND(B2>=40,C2>=40,D2>=40),”PASS”,”FAIL”)

• Where B2 ,C2 and D2 are the address of cells containing the marks.

## Step 4 – Press the Enter Key

• Press the Enter key to get the results.

## Step 5 – Apply the IF function to each row

• Use the “Handle Select” and “Drag and Drop” method to apply the function to each row.

## Step 1 – Select a Blank Cell

• Select a blank targeted cell where you want the results to be.

## Step 2 – Place an equals sign

• Place an Equals sign (=) in the targeted cell.

## Step 3 – Use the IF and OR function

• We can use the IF function for multiple conditions by combining it with the OR function.
• The OR functions return the first value when any one of the conditions is true and the second value if all the conditions are false.
• Combining IF and OR function the Syntax is

IF(OR(B2<40,C2<40,D2<40),”FAIL”,”PASS”)

• Where B2 ,C2 and D2 are the address of cells containing the marks.

## Step 4 – Press the Enter Key

• Press the Enter key to get the results.

## Step 5 – Apply the IF function to each row

• Use the “Handle Select” and “Drag and Drop” method to apply the function to each row.

## Step 1 – Select a Blank Cell

• Select a blank targeted cell where you want the results to be.

## Step 2 – Place an equals sign

• Place an Equals sign (=) in the targeted cell.

## Step 3 – Use the IFS function

• We can use the IFS function instead of combining IF with AND or OR function.
• IFS function checks the first condition if it is true then it returns the corresponding value and if not then it checks the next condition.
• The syntax of IFS function is

IFS(B2<40,”FAIL”,C2<40,”FAIL”,D2<40,”FAIL”,TRUE,”PASS”)

• Where B2 ,C2 and D2 are the address of cells containing the marks.

## Step 4 – Press the Enter Key

• Press the Enter key to get the results.

## Step 5 – Apply the IF function to each row

• Use the “Handle Select” and “Drag and Drop” method to apply the function to each row.