Find a course

Module 2: Formulas and FunctionsLesson 3 of 1212 min

Your First Formula

Write formulas with cell references, apply the order of operations correctly, calculate percent change, and recognize the common Excel error values.

Step 1 of 13Learn

Why spreadsheets beat calculators

Jordan prices a catering order on a calculator: 45 guests × $18 per plate, plus 8% tax. He writes the total on a sticky note. An hour later the client adds five guests, and he starts over. In Excel he would change one cell and every number would update instantly.

A formula always begins with an equals sign. Type =45*18 and Excel shows 810. That works, but it is no better than a calculator. The real power comes from cell references:

AB
1Guests45
2Price per plate18
3Subtotal=B1*B2
4Tax (8%)=B3*0.08
5Total=B3+B4

Now the formula in B3 means "multiply whatever is in B1 by whatever is in B2". Change B1 to 50 and the subtotal, tax and total all recalculate.

To build a formula, type =, then click the cell you want instead of typing its address, type an operator, click the next cell, and press Enter. Clicking avoids typos like B12 instead of B1. To see or edit a formula later, select the cell and look at the formula bar, or press F2. If you ever see your formula as plain text in the cell, you probably forgot the equals sign or the cell is formatted as Text.

Step 2 of 13Practice · Diagram

Jordan's catering order as linked cells

The client adds five guests. Which single cell do you edit?

Tap the shape that answers the question, then press Check.

Jordan's catering order as linked cellsProcess diagram: B1: Guests = 45 → B2: Price per plate = $18 → B3: =B1*B2 → B4: =B3*8% → B5: =B3+B4.B1: Guests = 45B2: Price per plate =$18B3: =B1*B2B4: =B3*8%B5: =B3+B4
B1: Guests = 45

Change this to 50 and everything to the right updates.

B2: Price per plate = $18
B3: =B1*B2

Subtotal $810.

B4: =B3*8%

Tax $64.80.

B5: =B3+B4

Total $874.80.

Step 3 of 13Learn

Operators and the order of operations

Excel uses these arithmetic operators:

OperatorMeaningExampleResult
+add=7+310
-subtract=7-34
*multiply=7*321
/divide=7/23.5
^power=2^38
%percent=20%0.2

Excel does not calculate left to right. It follows the same order of operations you learned in school: parentheses first, then powers, then multiplication and division, then addition and subtraction. Operations of the same rank run left to right.

  • =2+3*4 is 14, because 3*4 happens first.
  • =(2+3)*4 is 20, because parentheses come first.
  • =100-20/4 is 95, not 20.

One Excel quirk: a leading minus sign is applied before powers, so =-2^2 returns 4, while most math textbooks would say -4. Write =-(2^2) if you mean the textbook version.

When in doubt, add parentheses. They cost nothing and make your intent obvious to the next reader. The classic beginner bug is averaging with =A1+A2+A3/3, which divides only A3 by 3. The correct version is =(A1+A2+A3)/3, or simply =AVERAGE(A1:A3).

Step 4 of 13Practice · Diagram

Which part of a formula Excel does first

In =(2+3)*42, which level does Excel handle first?

Tap the shape that answers the question, then press Check.

Which part of a formula Excel does firstPyramid diagram: + and - (last), * and /, ^ powers, % percent, ( ) parentheses (first).+ and - (last)* and /^ powers% percent( ) parentheses (first)
Operators on the same level are worked left to right.
+ and - (last)
* and /
^ powers
% percent
( ) parentheses (first)

Step 5 of 13Practice · Work it out

What result does Excel return for =10+6/2*3-1 ?

Step 6 of 13Try the calculator

Order total builder

This is the catering sheet as a live model. Change the inputs and watch every result update, exactly like linked cells.

Subtotal =B1*B2
810 $
After discount =B1*B2*(1-B3)
729 $
Total with tax =B1*B2*(1-B3)*(1+B4)
787.32 $

Step 7 of 13Learn

Percent change and other everyday formulas

A handful of formula patterns cover a large share of everyday spreadsheet work:

  • Increase by a percentage: =B2*(1+C2). A $40 price with a 15% increase in C2 becomes 40 × 1.15 = $46.
  • Decrease by a percentage: =B2*(1-C2). A 15% discount turns $40 into $34.
  • Percent change from an old value to a new one: =(New-Old)/Old, then format as Percent. Sales rising from 80,000 to 92,000 is (92,000 − 80,000) / 80,000 = 0.15, or 15%.
  • Share of a total: =B2/B10 where B10 holds the total.

Percent change has a famous trap: divide by the old value, not the new one. Dividing 12,000 by 92,000 gives 13%, which understates the growth. Another trap is that percentages do not reverse symmetrically: a 20% drop followed by a 20% rise leaves you at 96% of where you started, because the rise is calculated on a smaller base.

Keep assumptions such as tax rates, discount rates or growth rates in their own labeled cells, not buried inside formulas as =B3*0.08. A rate typed into fifty formulas has to be found and changed fifty times. A rate in one cell is changed once. You'll see how to point many formulas at one cell safely later in this module.

Step 8 of 13Practice · Work it out

Monthly website visits went from 25,000 to 21,000. What is the percent change? Enter a number (use a minus sign for a decrease).

Step 9 of 13Try the calculator

Percent change checker

The pattern is =(New-Old)/Old. Try a rise and a fall.

Change
5,000
Percent change
20 %

Step 10 of 13Learn

When formulas go wrong: reading error values

Error values look alarming but each one tells you exactly what kind of problem to look for:

  • #DIV/0!: you divided by zero or by an empty cell. Common when a total or count is still blank.
  • #VALUE!: the formula tried to do math on text, such as ="ten"*2, or a number stored as text in an arithmetic formula.
  • #NAME?: Excel does not recognize a name, usually a misspelled function (=SUMM) or text missing its quotation marks.
  • #REF!: a reference points to a cell that no longer exists, often because a row or column was deleted.
  • #N/A: a lookup could not find the value it searched for (Module 3).
  • #####: not an error at all; the column is too narrow, or a date or time is negative.

A circular reference is different: a formula that depends on its own cell, such as =SUM(B2:B10) typed into B10. Excel warns you and usually shows 0, because the calculation can never finish.

To investigate, click the cell and use Formulas > Trace Precedents to draw arrows to the cells it uses, or Evaluate Formula to watch Excel calculate it step by step. Fix the cause rather than hiding the error: an error is far less dangerous than a wrong number that looks fine.

Step 11 of 13Practice · Match the pairs

Match each error value to its most likely cause.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. #DIV/0!
  2. #NAME?
  3. #REF!
  4. #VALUE!
  5. #####

Step 12 of 13Practice · Spot the mistake

Each formula below has a label saying what it is meant to calculate. Tap the formulas that will give the wrong result.

Step 13 of 13Practice · Choose one

Why is =B1*B2 usually better than typing =45*18 into a cell?