CodeMIRAI
0 XP

Relative and absolute references

2 min read Quiz included

When you copy a formula to another cell, Excel adjusts its references. Usually that's exactly what you want; sometimes it isn't, and that's what $ is for.

Relative references

ABCD
1ItemPriceQtyTotal
2Pen303=B2*C2
3Notebook452=B3*C3
4Bag7991=B4*C4

Type =B2*C2 in D2, then drag the fill handle (the small square at the cell's bottom-right corner) down to D4. Excel rewrites the formula on each row: =B3*C3, then =B4*C4.

A reference like B2 is relative: Excel stores it as "two columns to the left, same row". Copied one row down, it still points two columns left on the new row.

Absolute references: $

Now add tax, with the rate in a single cell, F1:

Copy C1 down to C3:ABC1102=A1*$B$1220=A2*$B$1330=A3*$B$1A1 moved to A2, A3(relative)$B$1 stayed put(absolute)
A relative reference shifts as you copy; a $ pins the column, the row, or both.
ABCDEF
1ItemPriceQtyTotal0.18
2Pen30390=D2*(1+$F$1)
3Notebook45290=D3*(1+$F$1)
Excel formula
=D2*(1+F1)       → filled down, becomes =D3*(1+F2): an empty cell, so the tax disappears
=D2*(1+$F$1)     → filled down, becomes =D3*(1+$F$1): always the rate cell

The dollar signs lock the reference: $F$1 means "column F and row 1, wherever this formula goes".

Mixed references

A $ can lock just the column or just the row:

ReferenceColumnRow
B2movesmoves
$B$2lockedlocked
$B2lockedmoves
B$2moveslocked

The classic use is a multiplication table. Put =$A2*B$1 in B2 and fill it across and down:

ABCD
1123
21=$A2*B$123
32246
43369

$A2 always reads from column A (the row numbers down the side), and B$1 always reads from row 1 (the numbers across the top). One formula fills the whole table.

Ranges

Excel formula
=SUM(B2:B10)          → a block of cells in one column
=SUM(B2:D10)          → a rectangle: columns B to D, rows 2 to 10
=SUM(B:B)             → the whole of column B
=SUM(2:2)             → the whole of row 2
=SUM(B2:B10, D2:D10)  → two separate ranges

Other sheets

Excel formula
=Prices!B2                   → cell B2 on the sheet named Prices
='June Sales'!D2             → names with spaces go in single quotes
=SUM(Jan:Mar!D2)             → D2 on every sheet from Jan to Mar

Click on another sheet while typing a formula, and Excel writes the reference for you.

Named ranges

Select F1, type TaxRate in the Name Box (left of the formula bar), and press Enter. Formulas can then say:

Excel formula
=D2*(1+TaxRate)

A name is absolute automatically, and it makes formulas read like sentences. Formulas → Name Manager lists and edits every name in the workbook.

Finished this lesson?Mark it complete to earn +20 XP and move your progress on.