How to use IF Function, Nested IF Function in Excel

IF Function, Nested IF Function

In this lesson, we will learn how to use IF function in Microsoft Excel:


IF Function:

IF function is the most popular and most useful function in Microsoft Excel. By using this function, you can easily create logical comparison or evaluation between a value and expectation.

You can test two condition, by using IF function;

  • If the condition is met, it is considered to be True.
  • If the condition is not met, it is considered as False.

Before discussing IF function, we would like to discuss most important logical operators that will help you in comparison between a value and your expectation.


Logical Operators mentioned below:



Formula of IF Function is mentioned below:

=IF(logical_test, [value_if_true], [value_if_false])

To provide you  better understanding, we would like to share an example of IF function as described below:


Example: Suppose that, you are working as a Inventory Manager of "Bee Mart" (departmental store), and you are responsible to maintain the minimum stock of 10 quantity of every items. To maintain the stock level, you need to create "Inventory Status Sheet".


By Following below mentioned steps, you can easily create inventory status sheet using IF function:


Step 1: First step is to create the inventory status sheet, which includes items description and on hand quantity etc. as mentioned below:

Step 2: Second step is to insert below mentioned IF formula in Cell "K5", to identify the items quantity which are less than 10. See below snapshot:
=IF(I5<10, "Re-Order", "Available")

Now you can see that, the on hand quantity is greater than 10 therefore the status is showing "Available" in Cell "K5" according to IF function.

Step 3: Now next step is to Select Cell "K5" and drag down this formula till Cell "K11" as mentioned in below snapshot:

Now you can see that, IF function working properly because wherever the on hand quantity is less than 10 so then the status showing "Re-Order" as mentioned in below snapshot:


Nested IF Function:

"Also called IF Function within another IF Function"

According to Microsoft, Nested IF Function meaning one function inside of another, this function allow you to test multiple criteria and increase the number of possible outcomes.


Example: As a teacher, you have conducted the exam and you need to create a "Grade Sheet" for result publication, as per the marks obtained by students.


By following below mentioned steps, you can easily create the grade sheet as mentioned below:


Step 1: First Step is to Create the List of Student with Obtained Marks as mentioned below:

Step 2: Now next step is to create grade condition on the basis of obtained marks as mentioned below:

Step 3: Now insert the below mentioned Nested IF formula to get the Students Grade on the basis of marks obtained by students:
=IF(D5>=1050,"A+",IF(D5>=950,"A",IF(D5>=850,"B",IF(D5>=450,"C",IF(D5>=0,"F")))))

Step 4: Now Next Step is to Select Cell "E5" and drag down this formula till Cell "E11" as mentioned in below snapshot:

Now you can see that, Nested IF function working properly as mentioned below:

Nested IF Formula Example
 ⇛How to Create Tax Calculator

We hope that you like this lesson.


---Thank You---

Post a Comment

0 Comments