# Excel IF function

Excel IF function comes in handy when you want the value displayed in a cell to depend on condition(s) happening in another cell.

This can also be referred to as conditional statement. In conditional statement, it’s either TRUE or FALSE.

For example, if you say, the content of cell A1 is greater than 500 (A1 > 500)

- You tell Excel what to output if the statement is TRUE
- You tell Excel what to output if the statement is FALSE

To make use of conditional statement, that’s when you need the excel IF function and excel IF function gets three argument.

- The statement that you test. For example: A1>500
- The output value if the argument is TRUE
- The output value if the argument is FALSE.

**Syntax**

=IF(statement,value_if_true,value_if_false)

Here is a simple concise example of people selling stuffs with sales made by each person in the worksheet below.

Let’s say, if a person sold at least five hundred naira (#500), he gets a commission rate of 10%.

On the other hand, if a person sold less than five hundred naira (<#500), he gets a commission rate of 5% as explained concisely in this video below.

Select cell C6, type =IF(logical test, (value_if_true), (value_if_false)).

- Logical test: B6>=500
- Value if True: 10% ($J$3)
- Value if False: 5% ($J$4)

Then, you press enter, all you have to do is auto fill the rest of the formula down the column, since first cell is absolute.

Don’t get confused with absolute reference, here is a good explanation.

But wait, what about the comment column, with conditional statement, you can use the IF function to output text as well as numbers.

So, let’s do that too,

Select cell E6, type =IF(logical test, (value_if_true), (value_if_false)).

- Logical test: B6>=500
- Value if True: “Great Job!”
- Value if False: “Better luck next time”

Double quotation mark is used with test and that’s just excel standard.

Always remember that when outputting text using excel IF function, you have to manually type the output value if True and If False in double quotation after your logical test.

Download file for practice

You can watch the video below for visual explanation and understand how excel IF function works. Thanks, sharing is caring.