Formulas, functions and cell references
Write Excel formulas with + - * /, use SUM, AVERAGE, MIN, MAX, COUNT and ROUND, copy formulas down with AutoFill, and lock cells with absolute references ($A$1) for rates and targets.
🎯 By the end of this lesson you will be able to:
- Write formulas that calculate from other cells
- Use SUM, AVERAGE, MIN, MAX, COUNT and ROUND
- Copy formulas correctly with relative and absolute references
Outline
What you'll learn and why it matters
A spreadsheet without formulas is just a table. Formulas make Excel do the maths, and when an input changes, every result updates instantly. This is the single most important Excel skill, and everything after this lesson builds on it.
Your first formula
Every formula starts with an equals sign =. Instead of typing numbers, refer to the cells that hold them, so the result updates when they change:
Worksheet: Order
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Product | Price | Units | Total |
| 2 | Notebook | 120 | 9 | 1080 |
| 3 | Pen set | 250 | 4 | 1000 |
| 4 | Backpack | 1500 | 2 | 3000 |
Formulas (green cells)
- D2 =B2*C2 → 1080
- D3 =B3*C3 → 1000
- D4 =B4*C4 → 3000
| Operator | Meaning | Example |
|---|---|---|
+ - | Add, subtract | =B2-C2 |
* / | Multiply, divide | =B2/12 |
^ | Power | =B2^2 |
( ) | Do this first | =(B2+C2)*0.18 |
Functions: SUM, AVERAGE and friends
A function is a built-in calculation. You give it a range in brackets:
Worksheet: Order
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Product | Price | Units | Total |
| 2 | Notebook | 120 | 9 | 1080 |
| 3 | Pen set | 250 | 4 | 1000 |
| 4 | Backpack | 1500 | 2 | 3000 |
| 5 | Sketchbook | 300 | 11 | 3300 |
| 6 | Total | 26 | 8380 | |
| 7 | Average | 542.5 | 6.5 | 2095 |
| 8 | Largest | 1500 | 11 | 3300 |
| 9 | Smallest | 120 | 2 | 1000 |
| 10 | Orders | 4 |
Formulas (green cells)
- D2 =B2*C2 → 1080
- D3 =B3*C3 → 1000
- D4 =B4*C4 → 3000
- D5 =B5*C5 → 3300
- C6 =SUM(C2:C5) → 26
- D6 =SUM(D2:D5) → 8380
- B7 =AVERAGE(B2:B5) → 542.5
- C7 =AVERAGE(C2:C5) → 6.5
- D7 =AVERAGE(D2:D5) → 2095
- B8 =MAX(B2:B5) → 1500
- C8 =MAX(C2:C5) → 11
- D8 =MAX(D2:D5) → 3300
- B9 =MIN(B2:B5) → 120
- C9 =MIN(C2:C5) → 2
- D9 =MIN(D2:D5) → 1000
- D10 =COUNT(D2:D5) → 4
| Function | Gives |
|---|---|
=SUM(D2:D5) | The total |
=AVERAGE(B2:B5) | The mean |
=MAX(…) / =MIN(…) | The largest / smallest |
=COUNT(…) | How many cells contain numbers |
=COUNTA(…) | How many cells are not empty (text too) |
=ROUND(value, 2) | The value rounded to 2 decimal places |
Copying formulas: relative references
You wrote =B2*C2 once in D2. To fill the rest of the column, drag D2's fill handle down. Excel adjusts the references for each row: D3 becomes =B3*C3, D4 =B4*C4. These are relative references: they mean *the cells in the same relative position*, not fixed addresses.
Locking a cell: absolute references
Sometimes every row must use one fixed cell, such as a tax rate. Copied normally, the reference would slide down to empty cells. Add $ signs to lock it: $B$1 stays $B$1 wherever you copy the formula. Press F4 after clicking a reference to add the $ signs.
Worksheet: Tax
| Row | A | B | C |
|---|---|---|---|
| 1 | Tax rate | 0.18 | |
| 2 | Product | Price | Price with tax |
| 3 | Notebook | 120 | 141.60 |
| 4 | Pen set | 250 | 295.00 |
| 5 | Backpack | 1500 | 1770.00 |
Formulas (green cells)
- C3 =B3*(1+$B$1) → 141.60
- C4 =B4*(1+$B$1) → 295.00
- C5 =B5*(1+$B$1) → 1770.00
| Reference | When copied down | When copied across |
|---|---|---|
B1 (relative) | Becomes B2, B3… | Becomes C1, D1… |
$B$1 (absolute) | Stays $B$1 | Stays $B$1 |
B$1 (mixed) | Stays row 1 | Column changes |
$B1 (mixed) | Row changes | Stays column B |
Practice
Guided exercise
Line totals and a grand total
Complete the order sheet: in D2 write a formula for the line total, copy it down to D4, then add a grand total in D5.
- In D2 type
=B2*C2and press Enter. - Drag D2's fill handle down to D4.
- In D5 type
=SUM(D2:D4).
Show the solution
Worksheet: Order
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Product | Price | Units | Total |
| 2 | Water bottle | 400 | 3 | 1200 |
| 3 | Desk lamp | 1200 | 1 | 1200 |
| 4 | Notebook | 120 | 10 | 1200 |
| 5 | Grand total | 3600 |
Formulas (green cells)
- D2 =B2*C2 → 1200
- D3 =B3*C3 → 1200
- D4 =B4*C4 → 1200
- D5 =SUM(D2:D4) → 3600
How to get there: One formula, copied down, adjusts its row numbers automatically. The grand total adds the three line totals: 1200 + 1200 + 1200 = 3600.
Your turn
Commission at a fixed rate
Each salesperson earns commission at the rate in B1 (5%). Write one formula in C3 and copy it down to C5 so every row uses the same rate. Round the commission to whole rupees.
Show the solution
Worksheet: Commission
| Row | A | B | C |
|---|---|---|---|
| 1 | Commission rate | 0.05 | |
| 2 | Salesperson | Sales | Commission |
| 3 | Asha | 14250 | 713 |
| 4 | Ravi | 9870 | 494 |
| 5 | Meera | 21430 | 1072 |
Formulas (green cells)
- C3 =ROUND(B3*$B$1,0) → 713
- C4 =ROUND(B4*$B$1,0) → 494
- C5 =ROUND(B5*$B$1,0) → 1072
How to get there: $B$1 stays fixed as the formula is copied, while B3 moves down to B4 and B5. ROUND(…, 0) gives whole numbers: 712.5 rounds to 713.
Common mistakes
Forgetting the =
You see: Excel shows the formula as text, such as B2*C2
Fix: Start every formula with =.
Copying a formula that should use a fixed cell
You see: Results of 0 or wrong values further down
Fix: Lock the fixed cell with $ (press F4).
Typing numbers into formulas
You see: Formulas go out of date when a rate changes
Fix: Put the number in its own cell and refer to it.
Including the total row in a SUM range
You see: A circular reference warning, or a doubled total
Fix: SUM only the data rows, such as D2:D4, not D5.
Recap
- Formulas start with = and should refer to cells, not typed numbers.
- SUM, AVERAGE, MIN, MAX, COUNT and ROUND summarise ranges like D2:D5.
- Relative references (B2) adjust when copied; that is how one formula fills a column.
- Absolute references ($B$1, press F4) stay fixed, for rates and targets.
Key terms
- Formula
- A calculation in a cell, starting with =.
- Function
- A built-in calculation such as SUM or AVERAGE.
- Relative reference
- A cell reference that adjusts when the formula is copied.
- Absolute reference
- A reference with $ signs, such as $B$1, that stays fixed when copied.
Check your understanding
Answer all 4 questions, then check your answers to see an explanation for each one.
1. D2 contains =B2*C2. You copy it to D3. What does D3 contain?
2. Which reference stays exactly the same wherever you copy it?
3. Which function counts how many cells contain numbers?
4. Why put a tax rate in its own cell instead of typing 1.18 into formulas?
Mark this lesson complete
Finished this lesson?
When you have worked through the examples and exercises, mark it complete to save your progress.