1. Computing

Excel IF Function

Excel IF Fucntion - Text only Tutorial


Excel IF Function

ExcelIF Function

© Ted French

Related Tutorial: Excel IF Function Step by Step Tutorial including screenshots -

The IF function tests to see if a certain condition in a spreadsheet is true or false.

The syntax for the IF function is:

=IF ( logical_test, value_if_true, value_if_false )

logical_test - a value or expression that is tested to see if it is true or false.

value_if_true - the value that is displayed if logical_test is true.

value_if_false - the value that is displayed if logical_test is false.

Example Using Excel's IF Function:

  1. Enter 35 into cell D1.

  2. Click on cell E1 - the location where the results will be displayed.

  3. Click on the Formulas tab.

  4. Choose Logical Functions from the ribbon to open the drop down list.

  5. Click on IF in the list to bring up the function's dialog box.

  6. On the Logical_test line in the dialog box, click on cell D1. After this type the less than symbol ( < ) and then the number 26.

  7. On the Value_if_true line of the dialog box, type 100.

  8. On the Value_if_false line of the dialog box, type 200.

  9. Click OK.

  10. The value 200 should appear in cell E1, since the value in D1 is greater than 26.

Changing the IF Function's Results

  1. To change the result in cell E1, change the number in cell D1. For example, change E1 to 15 and press the Enter key.

  2. The value 100 should now be present in cell E1 since the value in D1 is now less than 26.

  3. If you click on cell E1, the complete function = IF ( D1 < 26 , 100 , 200 ) appears in the formula bar above the worksheet.

©2014 About.com. All rights reserved.