Home ► Excel Functions ►** Excel IF Function**

## What is the use of Excel IF Function?

Use **Excel IF Function** to test a condition, If that condition is TRUE then it will return a value which you have specified or if that condition is FALSE it will return another value. In simple words, you can test a condition & function will return with result TRUE or FALSE & you can specify two different value to come in the result for both the situations. If function

## Syntax for Excel IF Function

IF(logical_test,value_if_true,value_if_false)

logical_test A condition which you want to evaluate.

value_if_true Value which you want to get if that condition is TRUE.

value_if_false Value which you want to get if that condition is FALSE.

## More Information on Excel IF Function

- You can use IF Function for nested formulas.
- The maximum number of nested condition you can perform is 64.
- You can use comparison operators to evaluate a condition in IF function.

## Examples to understand Excel IF Function

In above example, I have comparison operator to evaluate conditions using IF Function.

- I have used a specific text to get in the result if condition met or not.
- You can also use TRUE & FALSE to get in result.
- If skip to specify a value to get the result if the condition is TRUE, it will return zero.
- And, If you skip specifying a value to get the result if the condition is FALSE, it will return zero.

In above example, I have used IF Function to create a nesting formula. In above formula, I have specified a condition & if that condition is false then I have used another if function to evaluate another condition & perform a task & again that condition is FALSE I have used another IF Function. This way I have used IF Function for five times to create a nesting formula.

You can use the same for 64 times to create any type of nesting function.

You can increase it’s productivity by using OR Function & AND Function with it.

## Download Sample File

## Conclusion

Use **Excel IF Function** where you want to evaluate a condition & want to perform a specific task if that condition is TRUE or FALSE. Learn more about IF from here.