# The IF Function in Excel

The most common function in Excel would most likely be the SUM function, but our vote is that the excel IF function is definitely the most useful.  This tutorial explains how to use the IF function and how this can become an integral part to simplifying your formula editing.

‘IF’ is a logical function that allows for two (or more) possible outcomes. It is used to check the condition of a returned value and provide one value for a TRUE condition and another value for a FALSE condition.

## Let’s have a look at a basic Excel IF function in operation:

Displayed in the example below, is the monthly sales figures of 9 sale agents working at Alpheius Global Enterprises.  They were given a target of \$34,000 and anyone who has achieved that target will be given a commission of 5% on their sales.

In this example, we can use the IF Function to see which employees have reached their monthly sales targets.

If the IF function is TRUE then those employees who have met their monthly sales targets will be awarded 5% commission.

However, if the argument is FALSE, they have not reached their sales targets and will receive 0% commission.

1. To calculate, click in the cell D7 where we want our function to calculate commission of our first employee.
2. Then click on Insert Function command in the Formula Tab and find ‘IF’ Function. Click OK.

3. After you’ve clicked OK, the IF Function dialog box should open with three arguments. Let’s plug these arguments in one by one.

## Building the IF Function statement

1. Click in the first argument tab (Logical_Test) and then click on 45,000 which is the monthly sales of our 1st employee.

Notice, cell address C7 pops up in the tab. Type >= to check a condition of Greater than or Equal to and then click on 34,000 which is a target given to all agents.

Cell address of target D2 pops in the tab. As, target remains fixed for all the sales agent and we don’t want this cell to move down relative to our formula, we will lock this cell by plugging in the dollar signs \$D\$2. (F4 key can also be used as a shortcut). Also, notice TRUE appearing on the right side of our tab which indicates that condition stands TRUE for our 1st sales agent.

2. Click in the second argument tab (Value_if_True). Here we wish to calculate commission which is 5% of his monthly sales. So, we will first click on 45,000 (cell address: C7), type asterisk (*) which works as a multiplication operator in Excel and then click on 5% (cell address: D3). Like target, commission also remains fixed so we will also lock this cell \$D\$3.

3. Click in the third argument tab (Value_if_False). Here we will type ‘0’ as the employee did not meet the required Monthly sales target.

4. Click OK and you will see Commission of 1st employee appears in the cell D7.

5. Point towards the bottom right corner of the cell until you see four headed black arrow (also called fill handle). Then double click to populate the remaining cells with the IF function.

There you have it! One of the most useful and effective Excel functions that is sure to save you a lot of time and hassle. Check out these Top Excel Shortcuts or to learn more sign up for an Excel Course in a city near you.