In this lesson

Cells, formulas and references in Excel

Before any finance, the three ideas a spreadsheet rests on: how a cell is named, how a formula is written, and what happens to a formula when it is copied. A household spending list shows each one.

Level
Beginner
Reading time
About 12 minutes

By the end you will be able to:

  • read a cell address and a range and find what a cell really holds in the formula bar
  • write a formula with arithmetic signs and the SUM function
  • predict the order in which Excel calculates a formula
  • copy a formula down a column and say what each reference will become
  • lock a reference with dollar signs and spot the error when it is missing

A sheet is a grid of cells

Every finance task in this module happens in a worksheet, a grid of boxes called cells. A cell holds a number, some text or a formula. The power of a spreadsheet is the formula: you type how a number is worked out once, and the sheet keeps it right when the inputs change.

This lesson covers the three ideas everything else depends on: how a cell is named, how a formula is written, and what happens to a formula when you copy it. The example is a household spending list, the same kind of list used in the lesson on budgeting. You do not need to know any finance. Open Excel, or a free spreadsheet such as Google Sheets, and follow along.

Cells, addresses and the formula bar

Columns are lettered and rows are numbered, so every cell has an address made of the column letter and then the row number. The cell in column B, row 7 is B7. A group of neighbouring cells is a range, written with a colon: B2:B6 means B2, B3, B4, B5 and B6.

Click a cell and two things appear above the grid. The Name Box shows its address, and the formula bar shows what is really stored in it. This matters because a cell can show one thing and hold another. A cell that shows 58.5% may hold the formula =B2/$B$7. The sheet shows the result. The formula bar shows the recipe.

The figure draws this sheet the way Excel does. The yellow cells hold numbers that were typed. Everything else is text or a formula.

A small spending sheet: items in column A, amounts in column B, each item's share of the total in column C
RowABC
1ItemAmountShare
2Rent$1,20058.5%
3Groceries$45022.0%
4Transport$1808.8%
5Utilities$1607.8%
6Phone$602.9%
7Total$2,050100.0%
Cell C2 is selected. The sheet shows its result, 58.5%, while the formula bar shows what was typed. The yellow cells are the numbers you type.

Writing a formula

A formula always starts with an equals sign. Without it, Excel treats what you type as plain text. After the equals sign you can use numbers, cell addresses, arithmetic signs and functions. The signs are + to add, - to subtract, * to multiply, / to divide and ^ for a power.

To total the spending, click B7 and type =SUM(B2:B6), then press Enter. SUM is a function, a ready-made calculation, and B2:B6 is its argument, the thing it works on. Using the range instead of =B2+B3+B4+B5+B6 is shorter and is the better habit. Change any amount and B7 updates by itself.

Excel does not calculate from left to right. It works out brackets first, then powers, then multiplication and division, then addition and subtraction. The four formulas below were typed into a real sheet, and the results show the order at work.

Four formulas that show the order in which Excel calculates
RowAB
1You typeExcel shows
22 + 3 × 414
3(2 + 3) × 420
410 − 4 ÷ 28
52 ^ 3 × 216

Without brackets, =2+3*4 multiplies first and gives 14. With brackets, =(2+3)*4 gives 20. The third and fourth rows show division before subtraction and a power before a multiplication. When in doubt, add brackets. They cost nothing and show what you meant.

Copying a formula: relative references

In C2 the share of rent is rent divided by the total, =B2/$B$7. You do not retype this for each row. Select C2 and drag the small square at its corner down to C6, or copy and paste. Excel rewrites the formula for each row as it goes.

A reference like B2 is relative. It does not mean “column B, row 2”. It means “the cell in the same row, one column to the left”. Copy the formula one row down and it still means that, so it becomes B3. This is what makes one formula work for a whole column.

Locking a reference: absolute references

The total, though, must not move. Every share is divided by the same cell, B7. A dollar sign in front of the column letter or row number locks it, so $B$7 always means B7 wherever the formula is copied. This is an absolute reference. A reference with only one dollar sign, such as B$7 or $B7, locks only the row or only the column and is called mixed.

You do not need to type the dollar signs. After typing a reference in a formula, press F4 on Windows, or Cmd + T on a Mac, and Excel adds them. Pressing again cycles through the four forms.

The same sheet showing formulas instead of results
RowABC
1ItemAmountShare
2Rent$1,200=B2/$B$7
3Groceries$450=B3/$B$7
4Transport$180=B4/$B$7
5Utilities$160=B5/$B$7
6Phone$60=B6/$B$7
7Total=SUM(B2:B6)=SUM(C2:C6)
Copying C2 down to C3 changed B2 to B3 because it is relative, but left $B$7 alone because it is absolute.

The figure shows the same sheet with formulas displayed. You can do this in Excel by pressing Ctrl + ` on Windows, or by choosing Formulas then Show Formulas. Each row holds a different formula, yet all came from copying one. The first part changes, B2, B3, B4, while $B$7 stays fixed.

What happens if you forget the dollar signs

This is the commonest early mistake. Suppose C2 had been typed as =B2/B7, with no dollar signs, and then copied down. The divisor is relative too, so it slides down with the formula.

The same sheet when the total is not locked with dollar signs
RowABC
1ItemAmountShare
2Rent$1,20058.5%
3Groceries$450#DIV/0!
4Transport$180#DIV/0!
5Utilities$160#DIV/0!
6Phone$60#DIV/0!
Without dollar signs the divisor slid down with the formula. By C3 it points at B8, an empty cell, and Excel reports #DIV/0! because dividing by an empty cell is dividing by zero.

Only the first share, which was typed by hand, is right. The other four show #DIV/0!, and it is lucky that they do. If a number had happened to sit in B8, the sheet would have shown a plausible but wrong percentage with no warning. When you copy a formula that points at a total, a rate or any single fixed cell, check whether that part needs a dollar sign.

Try it yourself

Download the practice workbook. The first sheet is the one drawn above. The second, “Your turn”, holds a monthly income list with the totals and shares left blank in the yellow cells. Fill them in, then check the third sheet.

Download the practice workbook (free .xlsx, no sign-up).

What this lesson leaves out

  • An invented list. The spending amounts are made up to show the mechanics. They describe no real household.
  • One program's menus. Menu names differ slightly between Excel versions, Excel for Mac, and Google Sheets, so the lesson names the keys and the result rather than every click.
  • No formatting craft. Colours, fonts and column widths make a sheet easier to read but do not change a single answer, so they are left out.
  • No dates yet. Dates need their own rules and are not needed for the first six lessons.

Common mistakes

Typing a number where a formula belongs

If you type 2,050 into B7 instead of using SUM, the total will not change when an amount does. Use a formula for anything worked out from other cells.

Forgetting the equals sign

Without it Excel stores your formula as text, and the cell shows the formula instead of the answer.

Copying without thinking about dollar signs

Ask of every reference in a formula you will copy: should this move with the formula, or stay put?

Hiding a typed number inside a formula

A formula such as =B2*1.08 buries the 1.08. Put the 8% in its own labelled cell and point at it, so the next reader can see it.

Trusting a number because it looks right

Click the cell and read the formula bar. What is shown and what is stored can differ.

Questions to answer

1. Which cells does the range B2:B6 contain, and how many are there?

Show the working

B2, B3, B4, B5 and B6, which is 5 cells.

2. What does Excel return for =10-4/2, and why?

Show the working

8. Division comes before subtraction, so 4/2 = 2 and then 10 − 2 = 8.

3. C2 holds =B2/$B$7. After copying it to C5, what formula does C5 hold?

Show the working

=B5/$B$7. The relative B2 moved three rows down to B5, and the locked $B$7 did not move.

4. In the Your turn sheet, what formula gives the total in B7, and what is the answer?

Show the working

=SUM(B4:B6). The amounts are 3,200, 400 and 25, so the total is $3,625.

5. In the Your turn sheet, salary is 3,200 of the total. What share is that, to one decimal place, and which formula in C4 can be copied down to C6?

Show the working

=B4/$B$7 gives 3,200 ÷ 3,625 = 88.3%. The $B$7 stays locked when it is copied down, so side income is 11.0% and interest 0.7%.

Where this is used

  • A household totals its spending and works out what share each item takes.
  • An analyst copies one formula down a column of company figures to find the same ratio for every year.
  • A small business keeps one cell for its tax rate and points every formula at it, so a rate change is made once.
  • A student checks a textbook example by rebuilding it, which shows exactly where each number comes from.
  • A lender builds a repayment table by writing one row of formulas and copying it down.

Key terms

Cell
One box in the grid, named by its column letter and row number.
Address
The name of a cell, such as B7.
Range
A block of cells written with a colon, such as B2:B6.
Formula
An entry that starts with = and calculates a value.
Function
A ready-made calculation, such as SUM.
Argument
The value or range a function works on.
Relative reference
A reference that moves when the formula is copied, such as B2.
Absolute reference
A reference locked with dollar signs, such as $B$7.
Mixed reference
A reference with only the row or only the column locked, such as B$7.
Formula bar
The strip above the grid that shows what the selected cell really holds.

Questions people ask

Do I need Microsoft Excel to follow these lessons?

No. Every function in this module also works in Google Sheets and LibreOffice Calc, which are free. The practice files open in all three.

Why does my formula show as text?

Usually the equals sign is missing, or the cell was formatted as text before you typed. Clear the cell, set its format to General and type the formula again.

What does #DIV/0! mean?

The formula divided by zero or by an empty cell. Check the cell the divisor points at.

Should I type numbers inside formulas?

Only for things that never change, such as 12 months in a year. Anything that is an assumption belongs in its own cell.

Sources and review

  1. Microsoft Support, Switch between relative, absolute, and mixed references, for how a reference changes when a formula is copied and the keys that add the dollar signs.
  2. Microsoft Support, Formulas and functions, the index of Excel functions, for the arguments each function takes.

How the numbers were checked: every sheet drawn in this lesson was built as a real workbook, recalculated with LibreOffice, and drawn from the recalculated cells, so the figures are what a spreadsheet really computes. The worked answers were recomputed the same way. These are standard functions with the same definitions in Excel and Google Sheets. The practice file is the same workbook.