How to use IF Function in Excel- Step by step

Table of Contents

INTRODUCTION

In this article we’ll learn about the IF Function in Excel.

IF function comes under the LOGICAL FUNCTIONS category in Excel.

IF function is very important and is going to be used a lot which makes it one of the very important functions in excel.

Its the simplest function to insert any condition in excel.

IF checks if certain condition is true or not and places certain value if the condition is true and some other value if the condition is false.

What is the use of IF Function in Excel?

IF function is simply a decision maker on the basis of the given condition. IF function in Excel is used to perform logical tests and return one value if a condition is true and another value if it is false. It helps automate decision-making in spreadsheets by checking whether a certain condition is met.

IF Function can be used for the following functions in Excel:

  1. Automation: Instead of manually checking data, the IF function can automatically categorize or flag data based on your criteria.
  2. Decision-Making: It allows you to set conditions for the data and return different results based on whether the condition is true or false.

Prerequisites to learn IF Function in Excel

THERE ARE A FEW PREREQUISITES WHICH WILL ENABLE YOU TO UNDERSTAND THIS FUNCTION IN A BETTER WAY.

  • Basic understanding of how to use a formula or function.
  •  Basic understanding of rows and columns in Excel.
  •  Of course, Excel software.

Helpful links for the prerequisites mentioned above What Excel does? How to use formula in Excel?

What is the formula syntax of IF Function in Excel?

The Syntax for the function is

=IF(CONDITION TEST, VALUE IF CONDITION IS TRUE, VALUE IF CONDITION IS FALSE)

Example of using IF Function in Excel

DATA SAMPLE

Suppose we have to find if a person is KID or ADULT.

A person i s a kid if age<18 and adult if age>=18.

We’ll place it against the persons if he is kid or adult.

If function in excel
EXCEL: IF FUNCTION EXAMPLE

STEPS TO USE IF

The example has 8 persons with ages given in the next column.

We are checking if a person is kid or adult.

The formula used is=IF(F7<18,”KID”,”ADULT”)The output is shown in the picture. 

The first phrase is F7<18 checks if the value present in F7 is less than 18.

If yes, KID will be put as the value, if not , ADULT. The output is shown in the picture above.

KNOWLEDGE BYTES

What is NESTED IF in Excel ?

A nested IF in Excel refers to using multiple IF functions inside one another to evaluate more than one condition. It allows you to create complex decision-making logic by testing multiple criteria and returning different values based on those conditions.

In many situations, we’ll find a case where we will be having more than one conditions.

In that case , we can make use of NESTED IF .

The notation goes like this. =IF(condition1, value1,(if(condition 2,value 2, value 3))

if condition 1 is true, value 1 will go otherwise control will go to next condition ,if condition 2 is true, value 2 will come else value 3.

But nested If can become more complex if the number of conditions become too much. The management of the formula will also become tougher.

In spite of that, it offers us a number of benefits such as

  1. Nested If helps us to manage multiple conditions easily.
  2. Many conditions can be put in a single formula.
  3. The logic is clearly visible making it manageable, condition applied number of logics is not too high.
  4. It helps classification of data very easily.