1. Home
  2. Computing & Technology
  3. Spreadsheets

Excel 2007 IF Function
Using the Excel 2007 IF Fucntion

By , About.com Guide

Excel 2007 IF Function

Excel 2007 IF Function

© Ted French

The IF function, one of Excel's logical functions, 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:

Note: For help with this example, see the image to the right.

  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.

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

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

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


Related Articles
More Spreadsheets Quick Tips
Explore Spreadsheets
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Spreadsheets
  4. Excel Functions
  5. IF Functions
  6. IF Function - Excel 2007 IF Function

©2009 About.com, a part of The New York Times Company.

All rights reserved.