IF is one of the functions in the Logical function set of the Formulas tab in Excel. Its greatest use is for running a test and providing a response based on a true or false result. IF is quite a flexible statement and can be used in combination with many others, such as AND, OR, and SUMIF.
In this example it is used to provide two results. A text result, and then again, in another row to return a calculated number. Here, row 2 contains monthly sales figures, we can use the IF to see if they are on target.
In Cell B4, where we want our answer to appear, we run a test to see if the sales meet the target amount. Test: Is B2 greater than or equal to 3500?
If the test is true, then we can have the word “Hit” appear. If the test returns as false, then we have the word “miss” appear. (All text responses in this function must be in inverted comas).
The function writes as =IF(B2>=3500,”Hit”,”miss”)
In row 6, we can use the IF to perform a calculation. We run a test to see if the sales meet the target amount. If the answer is true, then we multiply the sales by the commission for a result. If it’s false, we get zero.
The function writes as =IF(B2>=3500,B2*2%,0)
These are just two uses of IF. It can be adapted even more powerfully when combined with others.
You may be interested in our Excel training courses:
Latest Cheat sheets:
Get access now!
Subscribe to our Newsletter for all the latest cheat sheets and resources.