Microsoft Excel 2024 Comprehensive Course — Beginner to Intermediate
X
Excel 2024 Microsoft 365
📗 34 Modules Foundations Data Entry Formatting Formulas Functions Charts Pivot Tables Data Analysis Protection Automation

🔗 Module 17: Relative & Absolute Cell References

Cell references are the backbone of every Excel formula. When you copy a formula, Excel decides which parts of it should shift to match the new location and which parts should stay fixed. Getting this wrong is one of the most common sources of formula errors in spreadsheets — you copy a formula down a column and suddenly every row is calculating against the wrong value. This module explains the three reference types in full: relative, absolute, and mixed. Once you understand them, copying formulas correctly becomes effortless.

17.1 What Is a Cell Reference?

A cell reference is the address of a cell used inside a formula. When Excel evaluates the formula, it reads the value from the referenced cell and uses it in the calculation.

ReferenceRefers ToExample Formula
B2The single cell at column B, row 2=B2*1.15 — multiplies the value in B2 by 1.15
B2:B51The range from B2 to B51 (50 cells)=SUM(B2:B51) — sums all 50 cells
Sheet2!B2Cell B2 on Sheet2=Sheet2!B2+A1

There are three types of cell references in Excel, and understanding the difference is critical for copying formulas correctly:

TypeNotationBehaviour When Copied
RelativeB2Shifts to match the new position — both column and row adjust
Absolute$B$2Stays fixed — column and row do not change regardless of where the formula is copied
Mixed$B2 or B$2One part fixed, one part shifts: either the column is locked ($B2) or the row is locked (B$2)

17.2 Relative References

A relative reference (e.g., B2) describes the position of the referenced cell relative to the formula cell. When you copy the formula to another cell, Excel does not copy the literal address — it copies the relationship (e.g., "the cell one column to the left and same row").

How Relative References Shift When Copied

Formula in C2: =A2+B2
Copy C2 to C3:  =A3+B3   (both references shifted down by 1 row)
Copy C2 to C4:  =A4+B4   (both references shifted down by 2 rows)
Copy C2 to D2:  =B2+C2   (both references shifted right by 1 column)
Copy C2 to E5:  =C5+D5   (shifted 2 right AND 3 down)
      A         B         C
1   Price     VAT Rate   VAT Amount
2   R500      15%       =A2*B2 → R75
3   R800      15%       =A3*B3 → R120  (copied down)
4   R1,200    15%       =A4*B4 → R180  (copied down)
5   R350      15%       =A5*B5 → R52.50 (copied down)

In this example, copying C2 downward works perfectly because each row has its own price and VAT rate, and the relative reference correctly adjusts to each row.

When Relative References Break

      A         B             C
1   Price     VAT Rate      VAT Amount
2   R500      [B1 = 15%]    =A2*B1 → R75  (correct — B1 has the rate)
3   R800                    =A3*B2 → R0   (WRONG! B2 is empty — B1 shifted down to B2)
4   R1,200                  =A4*B3 → R0   (WRONG! B3 is also empty)

When the VAT rate is in a single cell (B1) shared across all rows, a relative reference to B1 breaks when copied down because it shifts to B2, B3, B4 — which are empty. The solution is an absolute reference.

17.3 Absolute References

An absolute reference (e.g., $B$1) is fixed — the dollar signs lock both the column (B) and the row (1) so they never change when the formula is copied in any direction.

The Dollar Sign Meaning

  • $B$1 — the $ before B locks the column B; the $ before 1 locks the row 1. Both are fixed.
  • Think of each $ as a padlock: $B = "column B is padlocked", $1 = "row 1 is padlocked"

Fixing the VAT Rate Example with Absolute References

      A         B             C
1   Price     15%           VAT Amount
2   R500                    =A2*$B$1 → R75
3   R800                    =A3*$B$1 → R120 (copied down — $B$1 stays fixed!)
4   R1,200                  =A4*$B$1 → R180 (correct)
5   R350                    =A5*$B$1 → R52.50 (correct)

Now $B$1 always refers to the 15% VAT rate cell, no matter how far down the formula is copied.

Common Scenarios for Absolute References

ScenarioFormulaWhy Absolute
VAT rate in B1 applied to all prices=A2*$B$1B1 must stay fixed; A2 shifts down with each row
Each value as % of total in B10=B2/$B$10B10 (total) is fixed; B2 shifts down through the data
Lookup table for VLOOKUP=VLOOKUP(A2,$F$2:$G$50,2,0)The lookup table $F$2:$G$50 stays fixed; only A2 shifts
Commission rate in a single cell=C2*$H$1H1 holds the commission rate; C2 shifts per salesperson
Pass mark used in IF for all students=IF(B2>=$E$1,"Pass","Fail")E1 holds the pass mark; B2 shifts per student

17.4 Mixed References

A mixed reference locks only one part of the address — either the column or the row — while the other part remains relative. There are two types:

Type 1: Column Locked, Row Relative — $B2

  • The column (B) is fixed. The row (2) shifts when copied up or down.
  • When copied across columns (left/right): column stays B — does not move to C, D, etc.
  • When copied down rows: row shifts from 2 to 3, 4, 5…
Formula in C2: =$B2
Copy to D2:  =$B2  (column stays B even though we moved right to column D)
Copy to C3:  =$B3  (row shifts down)
Copy to D5:  =$B5  (column still B; row shifted to 5)

Type 2: Row Locked, Column Relative — B$2

  • The row (2) is fixed. The column (B) shifts when copied left or right.
  • When copied down rows: row stays 2 — does not move to 3, 4, 5…
  • When copied across columns: column shifts from B to C, D, E…
Formula in C3: =B$2
Copy to D3:  =C$2  (column shifts right; row stays 2)
Copy to C4:  =B$2  (column stays B; row stays 2)
Copy to E5:  =D$2  (column shifted 2 right to D; row still 2)

The Classic Mixed Reference Use Case — Multiplication Table

The most instructive example is a multiplication table where row headers and column headers both feed into each cell:

    A      B      C      D      E
1          1      2      3      4    ← Column headers in row 1
2   1                            ← Row headers in column A
3   2
4   3
5   4

Formula in B2: =$A2*B$1
• $A2 → column A is fixed (always the row header); row 2 shifts down
• B$1 → row 1 is fixed (always the column header); column B shifts right

Copy B2 across and down to fill the entire table:
B2 = $A2*B$1 = 1×1 = 1
C2 = $A2*C$1 = 1×2 = 2
D2 = $A2*D$1 = 1×3 = 3
B3 = $A3*B$1 = 2×1 = 2
C3 = $A3*C$1 = 2×2 = 4
D4 = $A4*D$1 = 3×3 = 9

A single formula =$A2*B$1 in B2, copied to the entire table, correctly fills every cell with the right product. Without mixed references, this would require 16 different formulas.

Mixed References in Real Business Formulas

ScenarioFormula in B2How It Copies
Monthly budget table: rows = departments (A2:A10), columns = months (B1:M1) =$A2*B$1 Copy right: month column shifts (B1, C1, D1…); column A stays fixed. Copy down: department row shifts (A2, A3, A4…); row 1 stays fixed.
Cumulative sum that starts at a fixed row =SUM($B$2:B2) Copy down: first B2 stays fixed (start of range), second B2 shifts (B3, B4…) — the range expands for a running total
Commission table: rows = salesperson, columns = commission tier =$A2*C$1 Column A (names) locked; row 1 (tier rates) locked. Copy anywhere and each cell references the correct name and tier.

17.5 The F4 Key — Cycling Through Reference Types

Manually typing dollar signs is slow and error-prone. The F4 key cycles through all four reference types automatically while you are editing a formula — it is the most important productivity shortcut for formulas.

How to Use F4

  1. Start typing a formula: =A2*B1
  2. Click on (or type) the cell reference you want to change (e.g., click B1 in the formula)
  3. Press F4 repeatedly to cycle through the four types:
F4 PressReference BecomesType
1st press$B$1Absolute — both column and row locked
2nd pressB$1Mixed — row locked, column relative
3rd press$B1Mixed — column locked, row relative
4th pressB1Relative — back to the original

When to Use F4

  • While writing a formula in a cell: place the cursor within or immediately after a cell reference in the formula → press F4
  • While editing an existing formula (press F2 to enter edit mode): click the reference you want to change → press F4
  • You can press F4 multiple times in one formula on different references to set each one independently
F4 Workflow Example:
Type =A2* → click cell B1 → press F4 once (becomes $B$1) → press Enter
Result: =A2*$B$1 — A2 is relative, B1 is absolute. Fast, accurate, no manual $ typing.

17.6 Identifying & Fixing Reference Errors

When a copied formula produces unexpected results, the cause is almost always a reference type mismatch. Here is how to diagnose and fix each scenario.

Symptom 1 — All Rows Show the Same Value

C2 = R75     C3 = R75     C4 = R75   (all the same!)
Formula in C2: =A2*$B$2 — looks like both locked
PROBLEM: B2 was locked but it should have been relative (each row has its own rate in B column)
FIX: Change to =A2*B2 (relative) — the rate is per-row, not a shared constant

Symptom 2 — Returns Zero or Blank After Copying

C2 = R75     C3 = 0     C4 = 0
Formula in C2: =A2*B1 — B1 has the rate
PROBLEM: B1 is relative. When copied to C3, becomes B2 (empty). C4 becomes B3 (empty).
FIX: Change to =A2*$B$1 (absolute) — the rate cell is shared, not per-row

Symptom 3 — #REF! Error After Copying

Formula originally in D5: =D5-C5
Copied to B5: =#REF!-A5
PROBLEM: D5 relative reference in column D became column B when copied left — then shifted left to column A (#REF! = before column A)
FIX: Lock the column if D is the fixed reference column: =$D5-C5

Diagnostic Technique — Click the Cell and Check the Formula Bar

  1. Click the cell with the incorrect result
  2. Read the formula in the Formula Bar — check which cells are actually being referenced
  3. Press F2 to enter Edit Mode — each referenced cell gets a coloured border so you can see visually where the formula is pointing
  4. Identify which references have shifted incorrectly
  5. Add or remove $ signs as needed → press Enter
  6. Copy the corrected formula again from the source cell

Find and Replace Dollar Signs

If you need to change a reference type across many formulas at once:

  1. Ctrl+H to open Find & Replace
  2. Find: $B$1 (or whichever reference needs changing)
  3. Replace: B1 (or the new reference type)
  4. Click Replace All
  5. This changes all occurrences of the reference type throughout selected cells or the whole sheet

17.7 Reference Types in Common Functions

Many formula errors in VLOOKUP, SUMIF, COUNTIF, and similar functions come from incorrect reference types in their arguments. Here are the correct patterns:

VLOOKUP — Lock the Lookup Table

CORRECT: =VLOOKUP(A2, $F$2:$G$50, 2, 0)
• A2 is relative — shifts down as you copy to A3, A4, A5…
• $F$2:$G$50 is absolute — the lookup table stays fixed

WRONG: =VLOOKUP(A2, F2:G50, 2, 0)
• When copied down, F2:G50 becomes F3:G51, then F4:G52…
• The lookup table shifts, missing the first row(s) and returning wrong or #N/A results

SUMIF / COUNTIF — Lock the Criteria Range

CORRECT: =SUMIF($B$2:$B$100, E2, $C$2:$C$100)
• $B$2:$B$100 and $C$2:$C$100 are absolute — data ranges stay fixed
• E2 is relative — the criteria cell shifts as you copy (E3, E4…)

Copy this formula down through column F to sum for each criterion in E.

% of Total — Lock the Total Cell

In C2 (to copy down): =B2/$B$10
• B2 is relative — shifts to B3, B4… (each row's value)
• $B$10 is absolute — the total cell is always B10

Without $B$10, copying down gives B3/B11, B4/B12… — dividing by wrong (or empty) cells

Running Total — Mixed Reference Expanding Range

In C2: =SUM($B$2:B2)
Copy down to C3: =SUM($B$2:B3)
Copy down to C4: =SUM($B$2:B4)

• $B$2 is absolute — the start of the sum always begins at B2
• B2 (second) is relative — the end of the sum expands down each row
• Result: a running cumulative total that grows as you go down

17.8 Named Ranges as Automatic Absolute References

As covered in Module 14, named ranges always behave as absolute references — without needing any dollar signs. This is a key reason professionals prefer named ranges over $-style absolute references.

Using $ AbsoluteUsing Named Range (Equivalent)
=A2*$B$1=A2*VATRate
=B2/$B$10=B2/TotalRevenue
=VLOOKUP(A2,$F$2:$G$50,2,0)=VLOOKUP(A2,ProductTable,2,0)
=IF(B2>=$E$1,"Pass","Fail")=IF(B2>=PassMark,"Pass","Fail")

Named ranges offer: readability (you can understand the formula instantly), no $ typing, and global availability across all sheets. When you have a frequently referenced constant or lookup table, name it.

17.9 Reference Type Decision Guide

When building a formula that will be copied, ask yourself these three questions for each cell reference in the formula:

FOR EACH cell reference in the formula, ask:

1. Should the ROW shift when copied DOWN?  → Yes: row is relative (no $). No: lock it ($2)
2. Should the COLUMN shift when copied RIGHT? → Yes: column is relative (no $). No: lock it ($B)

Apply the answers:
Row shifts, Column shifts  → B2   (fully relative)
Row fixed, Column shifts   → B$2  (row locked)
Row shifts, Column fixed   → $B2  (column locked)
Row fixed, Column fixed    → $B$2 (fully absolute)

Quick Decision Table

The referenced cell is…Use This TypeExample
On the same row, changes per rowRelative B2Each row's own price, name, quantity
A single shared constant (rate, tax, threshold)Absolute $B$1VAT rate, commission rate, pass mark
A lookup or reference tableAbsolute $F$2:$G$50VLOOKUP table, rate schedule, product list
A row header (formula copies across columns)Column locked $A2Department name in a cross-tab table
A column header (formula copies down rows)Row locked B$1Month name or period header in a cross-tab
A grand total for % calculationAbsolute $B$10Total revenue cell used as denominator
Start of an expanding cumulative rangeAbsolute start $B$2Running total: =SUM($B$2:B2)

17.10 Quick Self-Check

Q1: You enter =A2*B1 in cell C2, where A2 is a price and B1 is a 15% VAT rate. When you copy C2 down to C3, the result is 0. Why, and how do you fix it?

✓ B1 is a relative reference. When the formula is copied from C2 to C3, Excel shifts all references down by one row: A2 becomes A3 (correct — the next price) but B1 becomes B2, which is a different cell (probably empty, giving 0). The fix: change B1 to $B$1 (absolute). The corrected formula in C2 is =A2*$B$1. When copied to C3 it becomes =A3*$B$1 — A3 shifts correctly to the next price, and $B$1 stays locked on the VAT rate cell. Press F4 after clicking B1 in the formula to add the dollar signs automatically.

Q2: You are building a profit margin table. Row 2 has product prices (B2:F2) and column A has cost percentages (A3:A7). You want each inner cell to calculate price × (1 − cost%). Write the formula for B3 that can be copied to fill the entire table B3:F7.

✓ =B$2*(1-$A3). B$2: the row is locked ($2) because row 2 always contains the price headers; the column (B) shifts right as the formula copies across to C, D, E, F. $A3: the column is locked ($A) because column A always contains the cost percentages; the row (3) shifts down as the formula copies to rows 4, 5, 6, 7. When you copy B3 to F7, Excel correctly picks up each column's price (row 2) and each row's cost percentage (column A) for every cell in the table.

Q3: A VLOOKUP formula in D2 is =VLOOKUP(A2, F2:G50, 2, 0). When copied to D3, it returns wrong results. What is the problem and what is the fix?

✓ The lookup table range F2:G50 is a relative reference. When copied from D2 to D3, it shifts down one row and becomes F3:G51 — missing the first row of the lookup table (which may contain an important value). Copying further down shifts the range further, increasingly missing data. Fix: make the lookup table absolute: =VLOOKUP(A2, $F$2:$G$50, 2, 0). The $F$2:$G$50 stays fixed no matter how many rows the formula is copied. The A2 remains relative (correct — the lookup value shifts down to A3, A4, etc. for each row).

Q4: You have regional sales in B2:B7 and the total in B8. You want column C to show each region's percentage of total. Write the formula for C2 that copies correctly to C3:C7.

✓ =B2/$B$8 formatted as a percentage. B2 is relative — it shifts to B3, B4, B5, B6, B7 as the formula is copied down, picking up each region's sales figure. $B$8 is absolute — the total in B8 stays fixed as the denominator in every row. If $B$8 were relative, copying to C3 would divide by B9 (empty or wrong), C4 would divide by B10, etc. — giving incorrect percentages. The $ signs on B8 ensure it is always the total that every individual region value is divided by.

Q5: Describe exactly what happens to the formula =$A3*B$1 when it is copied from cell B3 to cell D6. What does the formula become?

✓ Moving from B3 to D6 is a shift of 2 columns right and 3 rows down. Apply the shift to each reference: $A3: the column $ is locked, so column A stays A (does not shift right by 2). The row 3 is relative, so it shifts down by 3 → becomes row 6. Result: $A6. B$1: the row $ is locked, so row 1 stays 1 (does not shift down by 3). The column B is relative, so it shifts right by 2 → becomes column D. Result: D$1. The formula in D6 is: =$A6*D$1. This is the correct mixed-reference behaviour that makes cross-tab tables work with a single copyable formula.

Q6: What does pressing F4 four times in a row do to a cell reference, and what is the practical workflow for adding an absolute reference to a formula?

✓ Pressing F4 four times cycles through all reference types: press 1 = $B$1 (absolute), press 2 = B$1 (row locked), press 3 = $B1 (column locked), press 4 = B1 (back to relative). It cycles repeatedly. Practical workflow: begin typing the formula, e.g., =A2* → click on the cell containing the VAT rate (e.g., B1) → before pressing Enter, press F4 once → $B$1 appears in the formula → press Enter. Result: =A2*$B$1 with the VAT rate absolute and the price reference relative. No manual dollar signs needed — F4 is faster and eliminates typos.

✓ Module 17 Complete — You Have Learned:

  • What cell references are — single cell, range, cross-sheet; the 3 reference types (Relative, Absolute, Mixed) and their notation
  • Relative references (B2) — copy the relationship, not the address; both column and row shift; when they work (per-row data); when they break (shared constant in one cell); visual example with VAT calculation
  • Absolute references ($B$2) — both parts locked; the $ as a padlock; fixing the VAT rate example; 5-scenario table (VAT rate, % of total, VLOOKUP table, commission rate, pass mark)
  • Mixed references — column locked row relative ($B2); row locked column relative (B$2); how each behaves when copied in different directions; multiplication table as the definitive example; cumulative SUM($B$2:B2) expanding range; business cross-tab example
  • F4 key — cycles: B1 → $B$1 → B$1 → $B1 → B1; F4 during formula entry; F4 during formula editing (F2 first); practical F4 workflow
  • Identifying and fixing reference errors — Symptom 1 (all same value = should be relative), Symptom 2 (zeros after copy = should be absolute), Symptom 3 (#REF! = shifted out of bounds); diagnostic with F2 and coloured borders; Find & Replace to batch-change $ signs
  • Reference types in common functions — VLOOKUP (lookup table must be absolute); SUMIF/COUNTIF (data ranges absolute, criteria cell relative); % of total ($denominator); running total (mixed $B$2:B2)
  • Named ranges as automatic absolute references — 4-formula comparison table; readability and cross-sheet advantages
  • Decision guide — 3-question framework (should row shift? should column shift?); 7-row quick decision table covering all common scenarios

← Back to All Modules