The IF logical function will return one value if a condition is true and another value if the condition is false. Use the IF function when you want to compare two items in your workbook. The IF function looks like this:
=IF(logical_test,value_if_true,
value_if_false)
To use the IF Function:
Logical operators are used to compare numbers in two or more cells to a constant. The logical operators for the IF function are:
= Equal to
< Less than
> Greater than
≤ Less than or equal to
≥ Greater than or equal to
≠ Not equal to
NOT Logical Not
AND Logical And
OR Logical Or