ExcelUnpackUnpack Excel, one formula at a time.
Log inSign up

Lesson 35 · Logic

IF with math in Excel

IF can give back numbers and math, not just words. =IF(B2>=50,0,5) charges $5 shipping under $50. You can also work out a discount only when an order is big enough.

Practice this lesson →Pro lesson. The first 4 lessons are free.

What you will learn

  • Return a number from IF
  • Do math inside IF

How it works

=IF(B2>=50,0,5) gives 0 if the price is $50 or more, otherwise 5.

You can put math in the answers too: =IF(B2>=50,B2*10%,0).

Formulas at a glance

=IF(B2>=50,0,5)free shipping over $50
=IF(B2>=50,B2*10%,0)10% reward

Example

Write the formula to give free shipping (0) if order A costs $50 or more. Otherwise shipping is 5.

ABCDE
1OrderPriceShippingTotalReward
2A$35.00
3B$60.00
4C$50.00
5D$12.00
6E$85.00

Click C2 and type =IF(B2>=50,0,5), then press Enter.

The answer is $5.00.

When to use it

  • Free shipping over a set amount
  • A discount or bonus only above a target
  • Different rates for different levels

Common mistakes

  • Putting numbers in quotes"5" is text. Write 5 so you can add it up later.
  • Writing 10% as 10Use 10% or 0.1 in the formula.
  • Mixing up the true and false partsThe answer if true comes first.

Practice it on a real sheet

Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.

IF with math in Excel: how it works, with examples · ExcelUnpack