Sub topic 3
Relative references: why copied formulas change
This chapter assumes that you can enter values and formulas in Google Sheets, read A1-style addresses such as A2, and use basic arithmetic operators. You will use those skills to understand what happens when a formula moves from one cell to another.
What a cell reference means
A cell reference is the address of another cell used by a formula. In =A2*0.2, A2 tells Google Sheets to use the value in column A, row 2.
A relative reference is a reference that describes a position relative to the formula cell. A2 is relative by default. When you copy the formula to another location, Google Sheets adjusts the reference by the same number of rows and columns.
Suppose column A contains prices and column B should contain a 20% discount:
| Cell | Content |
|---|---|
| A2 | 50 |
| B2 | `=A2*0.2` |
| B3 | `=A3*0.2` |
When you copy the formula from B2 to B3, the formula moves down one row. Its reference also moves down one row, from A2 to A3. This lets one formula work for every row in a list.
Why copied formulas change
Google Sheets treats a formula as a pattern, not just as text. In B2, the reference A2 is one column to the left and in the same row as the formula. When the formula moves to B3, the reference remains one column to the left and in the same row, so it becomes A3.
The same rule applies horizontally. If C2 contains =A2+B2 and you copy it to D2, each reference moves one column right:
C2: =A2+B2
D2: =B2+C2This behavior is useful when each row or column has corresponding data. It can also cause wrong results when a formula should continue using one fixed cell.
Ways to copy a formula
You can copy a formula in several ways:
- Drag the fill handle, the small square at the lower-right corner of the selected cell, over the destination cells.
- Copy the cell and paste it into another cell or range.
- Double-click the fill handle to autofill down alongside a neighboring column containing data.
All three methods normally adjust relative references. The formula changes because its new location changes, even when you use copy and paste rather than dragging.
Before copying, check that the source formula is correct. After copying, select a destination cell and read the formula bar. Comparing the source and destination formulas often reveals an unexpected row or column shift.
The common error: a reference that should not move
Imagine that E1 contains a discount rate, and B2 should calculate the discounted price from A2. If you write =A2*E1 and fill down, B3 becomes =A3*E2. The price reference changes correctly, but the rate reference also moves. Unless E2 contains the intended rate, the result is wrong.
This is a reference error, not an arithmetic error. The formula is valid, but it points to the wrong cell.
Cell E1: 0.2 (discount rate)
Cell B2: =A2*E1
Cell B3 after filling down: =A3*E2A later chapter explains how the dollar sign creates absolute and mixed references so that selected rows or columns stay fixed. For now, the key rule is: every reference without a dollar sign is relative and can move when the formula moves.
A quick troubleshooting method
When copied results look wrong:
- Select a cell with the wrong result.
- Read its formula in the formula bar.
- Compare each reference with the formula's position.
- Decide whether each reference should move by row, by column, or not at all.
- Correct the source formula before filling the range again.
Do not judge only by the displayed number. Two formulas can display the same result while pointing to different cells.
Exercise
If B2 contains =A2+10, what formula will appear in D4 after copying B2 to D4?
Show answer
=C4+10. The formula moved two columns right and two rows down, so A2 moved to C4.