# EXCEL FUNCTIONS-IF

## INTRODUCTION

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.

## PURPOSE OF IF IN EXCEL

IF FUNCTION CHECKS THE GIVEN CONDITION AND SETS THE VALUE AS PER THE OUTCOME OF CONDITION.(TRUE OR FALSE)

## PREREQUISITES TO LEARN IF

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 aboveWhat Excel does? How to use formula in Excel?

## SYNTAX: IF FUNCTION

The Syntax for the function is

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

## EXAMPLE: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.

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

## KNOWLEDGE BYTES

### NESTED IF

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.