How the IF function works
Related Tutorial: Excel 2007 / 2010 / 2013 IF Function Step by Step Tutorial
The Excel IF function checks to see if a certain condition is true or false. If the condition is true, the function will do one thing, if the condition is false, the function will do something else.
The IF function we are using in this tutorial asks if the value in column A is greater than the value in column B. If it is, the IF function will place the statement "A is larger" in column D. If it is not, the IF function will place the statement "B is larger" in column D.
Our IF function will be entered into cell D1 and it looks like this:
=IF(A3 > B3,"A is larger","B is larger")
Note: the two text statements "A is larger" and "B is larger" are enclosed in quotations. In order to add text to an Excel IF Function, it must be enclosed in quotation marks.