1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Excel IF Function Step by Step Tutorial

By

5 of 8

Writing the IF Function Logic Test
Entering the Logic Test for the 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,

©2014 About.com. All rights reserved.