DataSheety
Log inStart Free

DataSheety

← Excel Guides

Free Excel guide

How to Use IF in Excel

Use IF to make a decision in a worksheet. A sales report can show whether each result met its target, even when the target changes.

Try it yourself

Formula syntax

=IF(logical_test, value_if_true, [value_if_false])

Write the comparison first, then the result for TRUE, then the result for FALSE. Use >= to include equality.

Example formula

=IF(B2>=B3,"Met","Below")

With 120 in both B2 and B3, the comparison is true and the formula returns Met. If B2 drops to 119, it returns Below.

Common mistakes

  • Use >= instead of > if a result exactly on target qualifies.
  • Use double quotes for typed text. Leave the quotes off references such as B4.

Try it yourself

In B7, use IF to test whether actual sales in B2 meet or exceed the target in B3. Return B4 if true and B5 if false.

Keep practicing with the Excel course

Start with the free SUM exercise. You can try it before creating an account.

Related course lesson: IF function· Premium course lesson