References, Names and Table Formulas
Lock references with $, choose mixed references for two-way tables, and make formulas readable with named ranges and structured table references.
Welcome back!
Step 1 of 11Learn
Why copied formulas go wrong
Excel stores a reference like B2 not as an address but as a direction: "the cell one column left of me, in the same row." That's why you can write =B2*C2 in D2, double-click the fill handle, and get =B3*C3, =B4*C4 and so on. This is a relative reference, and it's what makes spreadsheets fast.
It also causes the most common copying bug. Suppose a tax rate of 8% sits in cell F1, and in D2 you write =C2*F1. Copied down to D3, it becomes =C3*F2. F2 is empty, so the tax comes out as 0, and nothing looks broken until someone checks.
The fix is an absolute reference: =C2*$F$1. The dollar signs lock both the column and the row, so every copy points at F1. You don't need to type the dollars. Click into the reference while editing and press F4 to cycle through four versions: $F$1, F$1, $F1, F1.
Ask one question about every reference before copying: should this move with the formula or stay put? Rates, thresholds and single settings stay put. Row-by-row values move.
Step 2 of 11Practice · Choose one
D2 contains =C2*$F$1. You copy it to E5. What does the copy contain?
Step 3 of 11Learn
Mixed references for two-way tables
Sometimes you want to lock only half a reference. A mixed reference locks the column ($A2) or the row (A$2), but not both.
The classic case is a two-way table. Suppose loan amounts run down column A (A3:A7) and interest rates run across row 2 (B2:F2), and each cell inside should show amount × rate. In B3 you write:
=$A3*B$2
Copy that one formula across and down the whole grid. $A3 keeps pointing at column A as you move right, but its row changes as you move down, picking up each amount. B$2 keeps pointing at row 2 as you move down, but its column changes as you move right, picking up each rate. One formula fills 25 cells correctly.
A quick test: the reference to the values down the side locks the column; the reference to the values across the top locks the row. If your grid shows the same number in every row or every column, one of the dollar signs is on the wrong side.
Step 4 of 11Compare
Four kinds of reference
| Aspect | When copied across (right) | When copied down |
|---|---|---|
| A1 (relative) | Column changes: B1, C1... | Row changes: A2, A3... |
| $A$1 (absolute) | Stays $A$1 | Stays $A$1 |
| $A1 (column locked) | Stays in column A | Row changes: $A2, $A3... |
| A$1 (row locked) | Column changes: B$1, C$1... | Stays in row 1 |
Step 5 of 11Practice · What would you do?
What would you do?
You're building a multiplication grid: numbers 1–10 down column A (A2:A11) and 1–10 across row 1 (B1:K1). You want one formula in B2 that you can copy to the whole grid. Which do you type?
Step 6 of 11Learn
Named ranges: formulas that explain themselves
Compare these two formulas:
=C2*$F$1
=C2*TaxRate
They do the same thing, but the second one tells you what it means. A named range is a label attached to a cell or range. To create one, select F1, click the Name Box to the left of the formula bar, type TaxRate and press Enter. You can also use Formulas > Name Manager to create, edit and delete names.
Names are absolute by default, so TaxRate never shifts when copied. They work across sheets: a name defined on a Settings sheet can be used on every other sheet without Settings!$F$1. And they make auditing easier, because a formula like =Revenue-Costs is hard to misread.
Rules: names can't contain spaces (use Tax_Rate or TaxRate), can't look like a cell address (TAX1 is a cell, so it's not allowed), and aren't case-sensitive. Keep names for values that matter, like rates, targets and key ranges. A workbook with 300 cryptic names is as hard to read as one with none.
Step 7 of 11Note
Step 8 of 11Learn
Structured references in Excel tables
Convert a data range into an Excel table with Ctrl+T and formulas get even more readable. Suppose the table is named Sales and has columns Units, Price and Amount. Type = in the Amount column, click the Units cell, type *, click the Price cell, and Excel writes:
=[@Units]*[@Price]
[@Units] means "the Units value in this row." The formula fills the whole column automatically, and new rows added at the bottom get it too.
Outside the table, refer to a whole column by name: =SUM(Sales[Amount]). When 200 new rows are added, the sum includes them with no range to edit. Compare that with =SUM(D2:D501), which silently stops at row 501.
A few patterns to recognize:
Sales[Amount]: all data in the Amount columnSales[@Amount]: Amount in the current rowSales[#Headers]: the header rowSales[[Units]:[Price]]: a block of adjacent columns
Rename a table in Table Design > Table Name. A name like Sales beats Table1 for the same reason TaxRate beats $F$1.
Step 9 of 11Practice · Match the pairs
Match each reference to what it means.
Tap an answer, then tap the place where it belongs (or drag it there).
- $B$4
- B$4
- TaxRate
- Sales[Amount]
- [@Units]
Step 10 of 11Practice · True or false
=SUM(Sales[Amount]) automatically includes new rows added to the bottom of the Sales table.
Step 11 of 11Practice · Choose one
Which formula is the best choice for a sales tax column that will be copied down 3,000 rows, with the rate stored in cell H1?
Lesson complete!