1. Home
  2. Computing & Technology
  3. Spreadsheets

How Do You Use IF Functions in Excel?

By , About.com Guide

Excel IF Function

Excel's IF Function

© Ted French
Question: How Do You Use IF Functions in Excel?
Answer: One of the most useful functions in Excel is the IF function. What it does is test a value in a specific cell to see if that value meets a certain condition. If the value does meet the condition, one result will happen, if false, a different action will occur.

Some people shy away from using this versatile function because of its apparent complexity. By doing this, they are missing out on one of the most useful functions available in Excel.

Writing the IF function:

=IF(logical_test, value_if_true, value_if_false)

Like all functions or formulas in Excel, this function begins with the equal sign ( = ), and, like all other functions and formulas, the answer goes in the cell where the equal sign is typed. Notice as well that the different parts of the function inside the round brackets are separated by commas ( , ).

Following the equal sign and the keyword “IF” is the “logical test”, which is a question that can only have true or false as the answer. After the logical test are two values - "value_if_true" and "value_if_false". One of these two values will be dislayed in the cell where the function is written.

Which value gets displayed depends on the logical test. Recall that the logical test can only have a true or false answer. If the answer is true, then the first value is displayed. If the answer is false, then the second value is displayed.

IF Function example

=IF(D1 < 26, 100, 200)

Breaking the example down into its three parts we have:

logical test: D1 < 26, ("<" means less than)
value if true: 100
value if false: 200

The results of this function will be:

  • If the value in D1 is less than 26, the value shown will be 100.
  • If the value in D1 is NOT less than 26, the value shown will be 200.
More Spreadsheets Q&A
Explore Spreadsheets
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

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

  1. Home
  2. Computing & Technology
  3. Spreadsheets
  4. Excel Functions
  5. IF Functions
  6. Excel IF Functions - IF Functions in Excel - How To Use Excel IF Functions

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

All rights reserved.