# Excel IF Function

HomeExcel Functions List (Top 100) Examples + Sample FileExcel IF Function (Example + Sample File)

## What is EXCEL IF FUNCTION

The Excel IF Function is listed under Microsoft Excel's Logical Functions category. It returns a value if the condition you specify is TRUE, else some other value. In simple words, the IF function can test a condition first and returns a value based on the result of that condition

## How to use it

To learn how to use the IF function in Excel, you need to understand its syntax and arguments:

### Syntax

IF(logical_test,value_if_true,value_if_false)

### Arguments

• logical_test: The condition which you want to evaluate.
• value_if_true: The value which you want to get if that condition is TRUE.
• value_if_false: The value which you want to get if that condition is FALSE.

### Notes

• The maximum number of nested conditions you can perform is 64.
• You can use comparison operators to evaluate a condition.

## Example

To master the IF function we need to try it out in an example, so make sure to check out the below one:

In the below example, we have used a comparison operator to evaluate different conditions

1. We have used a specific text to get in the result if the condition met or not.
2. You can also use TRUE and FALSE to get in result.
3. If you skip specifying a value to get the result if the condition is TRUE, it will return zero.
4. And if you skip specifying a value to get the result if the condition is FALSE, it will return zero.

In the below example, we have used the IF function to create a nesting formula.

We have specified a condition and if that condition is false then we have used another IF to evaluate another condition and perform a task and if that condition is FALSE we have used another IF.

In this way, we have used IF five times to create a nesting formula. You can use the same for 64 times for a nesting formula.

## Related functions

This tutorial is the part of our Excel Functions with Examples (Function Guide) and below are some of the related functions:

Puneet Gogia

Puneet is using Excel since his college days. He helped thousands of people to understand the power of the spreadsheets and learn Microsoft Excel. You can ﬁnd him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.