Find a course

Module 2: Formulas and FunctionsLesson 5 of 1213 min

Relative, Absolute and Mixed References

Learn why copied formulas shift, when to lock references with dollar signs, and how mixed references build whole tables from one formula.

Step 1 of 12Learn

Why a copied formula changes

Priya writes =B2*C2 in D2 to calculate the cost of an order line, then double-clicks the fill handle. Every row below gets the right answer. She never typed =B3*C3 or =B4*C4, yet that is exactly what the cells contain. How?

Excel does not store "B2" as a fixed place. It stores the reference relative to the formula's cell: "the cell two columns to my left, same row". When the formula moves down one row, the reference moves with it. That's a relative reference, the default, and it is why one formula can fill a column of 10,000 rows.

B (Qty)C (Price)D (Cost)
234.50=B2*C2
3101.20=B3*C3
462.00=B4*C4

Copying across works the same way: copy =B2*C2 one column to the right and it becomes =C2*D2.

Relative references are perfect when each row should use its own values. They break when every row should use the same cell, such as a single tax rate or exchange rate. That's the problem the dollar sign solves.

Step 2 of 12Diagram

One instruction, copied down

One instruction, copied downProcess diagram: D2: =B2*C2 → D3: =B3*C3 → D4: =B4*C4 → D5: =B5*C5.D2: =B2*C2D3: =B3*C3D4: =B4*C4D5: =B5*C5

Tap a shape with to see more.

D2: =B2*C2

Stored as: two columns left times one column left, same row.

D3: =B3*C3

Same instruction, one row lower.

D4: =B4*C4
D5: =B5*C5

Step 3 of 12Learn

Locking a reference with $

Now Priya adds a commission rate of 5% in cell F1 and writes =D2*F1 in E2. Row 2 is right. She copies it down, and row 3 shows 0. Why? The relative reference moved: E3 contains =D3*F2, and F2 is empty.

The fix is an absolute reference: $F$1. The dollar sign before the column locks the column; the one before the row locks the row. =D2*$F$1 copied down becomes =D3*$F$1, =D4*$F$1 and so on. The D part moves, the F1 part stays.

You rarely type the dollars yourself. While editing a formula, put the cursor on a reference and press F4 (Fn+F4 on many laptops, Cmd+T on a Mac). Each press cycles through four versions:

F1 → $F$1 → F$1 → $F1 → F1

The two middle options are mixed references: only one part is locked. You'll use those for two-way tables shortly.

Rule of thumb: ask, "When I copy this formula, should this reference move?" Inputs that belong to each row move (relative). Single settings such as rates, targets or totals stay (absolute). Absolute references point to one cell, so if you later move that cell by cutting and pasting, Excel updates the formulas for you; only copying leaves them fixed.

Step 4 of 12Practice · Diagram

Press F4 to cycle a reference

Priya's commission rate sits in F1 and must stay fixed when copied in any direction. Which form does she need?

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

Press F4 to cycle a referenceCycle diagram: F1 → $F$1 → F$1 → $F1.F4 (Fn+F4 onsomelaptops)F1$F$1F$1$F1
F1

Relative: both column and row move when copied.

$F$1

Absolute: nothing moves.

F$1

Row locked, column moves.

$F1

Column locked, row moves.

Step 5 of 12Practice · Choose one

Cell D2 contains =B2*C2. You copy D2 and paste it into D6. What formula is in D6?

Step 6 of 12Compare

What each reference type does when copied

AspectA1 (relative)$A$1 (absolute)A$1 (row locked)$A1 (column locked)
Copied down one rowA2$A$1A$1$A2
Copied right one columnB1$A$1B$1$A1
Typical useEach row uses its own valuesOne fixed setting, such as a tax rateA header row, such as months across the topA label column, such as product names down the side

Step 7 of 12Practice · What would you do?

What would you do?

Ana lists five products with sales in B2:B6 and the total in B7. In C2 she types =B2/B7 to get each product's share, formats it as Percent and copies it down to C6. C2 shows 18%, but C3 to C6 show #DIV/0!. What should the formula in C2 be?

Step 8 of 12Learn

Mixed references: one formula, a whole table

Mixed references shine in two-way tables, where every cell combines one value from a header row and one from a label column.

Imagine a pricing grid: unit prices down column A (A2:A6) and quantities across row 1 (B1:F1). Each cell should show price × quantity. Type this once in B2:

=$A2*B$1

  • $A2: the column is locked to A (prices always live there) but the row is free to move down.
  • B$1: the row is locked to 1 (quantities always live there) but the column is free to move right.

Copy B2 across to F2 and down to row 6 and all 25 cells are correct. In D4, the formula reads =$A4*D$1: the price from row 4, the quantity from column D.

The same idea builds loan tables, commission grids, multiplication charts and currency converters. When you design one, say out loud which direction each reference should follow: "the price follows the row, the quantity follows the column". Lock the part that must not change.

A safer alternative for important single settings is a named cell. Select F1, type CommissionRate in the Name Box and press Enter. Now =D2*CommissionRate always points to F1, reads like a sentence, and never needs dollar signs.

Step 9 of 12Practice · Fill in the blanks

Fill in the blanks

In a grid where prices run down column A and quantities run across row 1, the formula in B2 is =* so it can be copied across and down.

Step 10 of 12Learn

References to other sheets and files

Real workbooks spread data over several sheets, and formulas can reach across them:

  • =Rates!B2 refers to cell B2 on the sheet named Rates.
  • ='Q1 Sales'!D5 needs single quotes because the sheet name contains a space.
  • =SUM(January:March!B4) is a 3D reference: B4 on every sheet from January to March, added together.

The easiest way to build these is to type =, click the other sheet's tab, click the cell and press Enter. Excel writes the reference correctly, quotes included.

Formulas can also point to other workbooks, such as =[Budget.xlsx]Summary!C3. These external links work but are fragile: if the other file is renamed, moved or emailed without its partner, the link breaks or shows old values. Where possible, bring the data into the same workbook.

Copying rules apply across sheets too: =Rates!B2 is relative and will shift when copied, so a single rate on another sheet still needs $ signs (=Rates!$B$2) or a name. Finally, deleting a sheet that formulas depend on turns those formulas into #REF! errors, so check with Trace Dependents before you delete anything that other cells use.

Step 11 of 12Practice · True or false

A formula referring to a cell on a sheet called Q1 Sales must put the sheet name in single quotes, like ='Q1 Sales'!D5.

Step 12 of 12Practice · Choose one

The formula =B$3*$C4 is in cell D5. You copy it to F8 (two columns right, three rows down). What does F8 contain?