How to do an IF statement in Excel

 Jan 10, 2014

An IF statement or an IF function is a way to ask a closed ended question that can be one of two answers, either true or false. Once the result is determined then you get to define what you want it to do in the case of a true answer and also what to do if it is found to be false. The instruction in either case can be text or a value or a formula. Follow these simple steps below to create an IF statement:

Step 1:

Enter =IF( in the cell and then open up the function argument dialogue box by hitting the fx button at the left side of the formula bar.  This will open up the box that will allow you to fill in the blanks of what this functions Arguments require to work.  Use the definitions below to help you know what content or variable to put in each blank. IF Statements - Step 1   The Logical Test field is where you would form the question of what you want to compare or have the answer based on.  For example: ‘is the quantity in stock more than 30?’, or ‘is the sale price below our cost?’, or ‘did the sales reps sell more than their goal?’

Step 2:

Once the question is phrased right then you will see in the argument box the word true or false on the right side of the logical test field in the argument box. IF Statements - Step 2  

Step 3:

Now all you need to do is define what to do if true and what to do if false.  If you leave those fields blank it will still work but the actual words TRUE or FALSE will appear.  It is better to put your own words like Well Done or Try harder to make it more meaningful. IF Statements - Step 3   If you are using the function argument dialogue box then you do not have to put “quote” marks around the text as it will automatically put them in for you.  If you were writing the formula manually without the dialogue box then you would have to remember to enclose the text in the quote marks.

Step 4:

Hit OK then you should be able to copy this formula down to all the cells in the column and see that each one we react differently to the question and give the appropriate results. IF Statements - Step 4

How do your Excel skills stack up?   

Test Now  

About the Author:

Liz French  

With over 7 years of experience as a trainer, and an extensive skill set that spans across the entire Microsoft Office suite of applications, Liz brings an incredible amount of knowledge, expertise and care to each course she delivers. Having worked as a tutor in the education sector for many years prior to her career at New Horizons, Liz has gained an extensive amount of experience in providing training to individuals and groups of varying skill levels. As a certified Microsoft Office Master, Liz is a highly capable trainer who possesses the ability to connect with students of all levels and backgrounds in order to help improve their skills across a wide range of common Desktop Applications.

Read full bio