1. Home
  2. Computing & Technology
  3. Spreadsheets

Excel IF Function Step by Step Tutorial

By Ted French, About.com

5 of 8

Writing the IF Function Logic Test

Entering the Logic Test for the Excel IF Function

Entering the Logic Test for the IF Function

© Ted French

Writing the IF Function Logic Test

The logic test is always a comparison between two amounts. In this tutorial we are comparing the values in cells A3 and B3. Between the two values we place a comparison operator. Since we want to know if A3 is greater than B3, we will use the Greater Than operator " > " between the two cell references.

Comparison Operators

The comparison operators that can be used in the logical test portion of an Excel IF function are:

Equals (=)
Less than (<)
Less than or equal to (<=)
Greater than (>)
Greater than or equal to (>=)
Not equal to (<>)

For our tutorial:

type A3 > B3 followed by a comma ","

In cell D1 you should now see:

=IF(A3 > B3,

5 of 8

Explore Spreadsheets

More from About.com

  1. Home
  2. Computing & Technology
  3. Spreadsheets
  4. Excel Functions
  5. IF Functions
  6. Excel IF Function - How to Create an IF Function in Excel - Entering the Comparison Amount

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

All rights reserved.