Sub topic 3
Absolute references: locking a cell with $
This chapter assumes you can enter and edit a basic formula, select cells and ranges, and copy cells or use the fill handle. It also assumes you have seen relative references, where a formula's addresses shift when you copy it. Here you will learn how to stop an address from shifting by adding dollar signs.
The problem that relative references create
Suppose column A holds item names, column B holds prices, and cell E1 holds a tax rate of 8%. You want column D to show each price with tax added. A natural first attempt in D2 is:
D2: =B2*E1D2 works. The price in B2 is multiplied by the rate in E1. Now fill the formula down to D3. Excel treats both addresses as relative, so both move down one row:
D2: =B2*E1
D3: =B3*E2
D4: =B4*E3D3 now multiplies by E2, which is empty. An empty cell counts as 0 in arithmetic, so D3 shows 0. The price reference moved correctly. The tax rate reference should not have moved at all.
This is the core situation where you need an absolute reference. Some inputs in a model are fixed: a tax rate, an exchange rate, a discount, a conversion factor, a target, a total. Every copy of the formula must point at the same cell.
What an absolute reference is
An absolute reference is a cell address with a dollar sign in front of both the column letter and the row number. The dollar sign tells Excel not to adjust that part of the address when the formula is copied or filled.
| Written as | Meaning | Type |
|---|---|---|
| `E1` | Column and row both shift | Relative |
| `$E$1` | Column and row both locked | Absolute |
| `$E1` | Column locked, row shifts | Mixed |
| `E$1` | Row locked, column shifts | Mixed |
This chapter focuses on the $E$1 form. The next chapter covers mixed references in detail.
Here is the corrected tax formula:
D2: =B2*$E$1When you fill it down, B2 is relative and changes. $E$1 is absolute and stays put:
D2: =B2*$E$1
D3: =B3*$E$1
D4: =B4*$E$1Every row now uses the rate in E1. If the tax rate changes, you edit one cell and every result updates.
How Excel interprets the dollar signs
A reference is really two separate pieces: a column part and a row part. Each piece is either locked or free. The $ applies to the piece that comes right after it.
- In
$E$1, the first$locks column E and the second$locks row 1. - When Excel copies the formula, it works out how far the formula moved: so many columns and so many rows.
- It then applies that offset only to the unlocked parts of each reference.
So the copy rule is: relative parts move by the offset, locked parts stay the same.
Notice that the offset applies in both directions. If you fill the same formula across to column E instead of down, B2 would become C2 and $E$1 would still stay locked. An absolute reference ignores every kind of copy offset, horizontal or vertical.
Worked example: share of a total
A common use is calculating each item's percentage of a total. Suppose B2:B10 holds sales figures. You want C2:C10 to show each figure as a share of the total.
The formula in C2 is:
C2: =B2/SUM($B$2:$B$10)Here B2 is relative, so each row divides its own value. The range $B$2:$B$10 is absolute, so every row divides by the same total. Written out for the first few rows after filling down:
C2: =B2/SUM($B$2:$B$10)
C3: =B3/SUM($B$2:$B$10)
C4: =B4/SUM($B$2:$B$10)If you had left the range relative, the formula in C3 would sum B3:B11, and C4 would sum B4:B12. Each row would divide by a different, shrinking total, and the percentages would be wrong. Nothing would warn you. The cells would just show plausible-looking numbers.
A range has two corners, and each corner needs its own dollar signs. $B$2:$B$10 locks both. Writing $B$2:B10 locks only the first corner, which is a different behavior (an expanding range) and is covered in a later chapter.
Choosing between relative and absolute
Before you copy a formula, look at each reference and ask one question: when this formula moves to another cell, should this input move with it?
| Situation | Reference type |
|---|---|
| The input is in the same row or column as the formula, one per row | Relative |
| The input is a single fixed cell used by every copy | Absolute |
| The input is a fixed block, such as a lookup table | Absolute on the whole range |
| The input depends on the row only or the column only | Mixed |
Typical inputs that should be absolute:
- A tax rate, discount, interest rate, or commission percentage.
- An exchange rate or unit conversion factor.
- A grand total used as a denominator.
- A lookup table passed to
VLOOKUPorINDEX/MATCH. - A target date or threshold used in a comparison.
The lookup table case causes many errors. Consider this formula that finds a price from a product list in $G$2:$H$20:
C2: =VLOOKUP(A2,$G$2:$H$20,2,FALSE)A2 is relative because each row looks up its own product. The table range is absolute because every row searches the same table. Without the dollar signs, the table range would slide down as you fill, and lookups near the bottom would search a table that has drifted past its data and return #N/A.
Typing and editing absolute references
You can type the dollar signs by hand. You can also put the cursor inside or next to an address while editing a formula and press F4, which cycles through the four reference types. The chapter on the F4 shortcut covers this in full, so this chapter only notes that F4 is the fast way to add $ characters without typing them.
When you click a cell to build a reference, Excel inserts it as relative. You then convert it to absolute. A reliable workflow for the tax example:
- Click D2 and type
=. - Click B2, then type
*. - Click E1. The formula reads
=B2*E1. - Press F4 once. The formula becomes
=B2*$E$1. - Press Enter, then fill down.
Absolute references and copy behavior
An absolute reference is locked against copy and fill. This is about how Excel rewrites a formula in its new location. It does not mean the cell itself is protected from changes, and it does not stop you from editing the formula or the referenced cell.
Two details are worth knowing now, with full treatment in a later chapter:
- Copy and paste, and fill, rewrite relative parts and leave absolute parts alone.
- Cut and paste moves the formula without rewriting its references at all. A formula that is cut and pasted keeps pointing at exactly the same cells, whether they are relative or absolute.
Another practical point: an absolute reference stays tied to a specific cell address. If you insert a row above row 1 so that the tax rate moves from E1 to E2, Excel updates $E$1 to $E$2 in every formula that refers to it, because Excel follows the cell, not the text of the address. The dollar signs control copying behavior only. They do not freeze a reference to a position on the sheet.
Absolute references to other sheets
You can lock a reference on another sheet by adding the sheet name and an exclamation mark before the address. If the tax rate lives in cell B1 on a sheet named Rates, the formula is:
C2: =B2*Rates!$B$1The dollar signs still do the work. The sheet name prefix chooses the sheet, and $B$1 fixes the cell. Without the dollar signs, filling down would give Rates!B2, then Rates!B3, and so on, which would read from the wrong cells of the Rates sheet.
If a sheet name contains spaces or special characters, wrap it in single quotes:
C2: =B2*'Tax Rates'!$B$1Keeping assumptions on a separate sheet is a good habit. It keeps inputs visible in one place and keeps working sheets uncluttered.
Named ranges as an alternative
An absolute reference like $E$1 is correct but says nothing about its meaning. A defined name gives the cell a readable label. If you name E1 as TaxRate, the formula becomes:
D2: =B2*TaxRateA defined name behaves as an absolute reference by default. Filling the formula down keeps pointing at E1, with no dollar signs needed. To create a name, select E1, click the Name Box to the left of the formula bar, type TaxRate, and press Enter.
Names have trade-offs.
| Approach | Strength | Weakness |
|---|---|---|
| `$E$1` | Visible in the formula, click to trace, no setup | Hard to read in long formulas |
| `TaxRate` | Self-documenting | Hidden location, needs Name Manager to audit |
For a small sheet, $E$1 is usually fine. For a model that other people will read, a name is often clearer. Names are covered in their own chapter.
Common mistakes with absolute references
The errors fall into a few patterns.
Locking too little. You forget the dollar signs, fill down, and the fixed cell drifts. Symptoms: zeros, #DIV/0!, #N/A, or numbers that look slightly wrong. To diagnose, click a cell several rows down and look at the formula. If the fixed input has moved, add the dollar signs and fill again.
Locking too much. You make everything absolute, including the input that should change per row. Every row then shows the same value:
D2: =$B$2*$E$1
D3: =$B$2*$E$1Every row multiplies the first price by the rate, so the column shows one repeated result. If a filled column shows identical numbers where you expect variety, look for an over-locked reference.
Locking only half. Writing $E1 or E$1 where you meant $E$1. Filling down with $E1 lets the row shift, so the reference slides down column E. Filling across with E$1 lets the column shift. Check both parts of each address.
Fixing the first cell but not re-filling. After you correct D2, the cells below still hold the old formulas. Copy the corrected D2 and paste or fill it over the rest of the column.
Locking a range corner by corner. In SUM($B$2:$B$10), both corners need locking. If only one corner is locked, the range changes size as it is filled.
To debug quickly, press Ctrl+` (grave accent) to switch the sheet into formula view, where each cell shows its formula instead of its value. You can scan a whole column and see exactly where an address drifted. Pressing the same keys again returns to normal view. You can also select a cell and press F2 to see its precedents highlighted in color.
A complete example
Here is a small sheet that combines several ideas. Prices are in B2:B6, a tax rate is in E1, and a discount rate is in E2.
D2: =B2*(1-$E$2)*(1+$E$1)Fill D2 down to D6. B2 moves with each row. $E$2 and $E$1 stay fixed, so every row applies the same discount and the same tax. Changing E1 or E2 updates the whole column at once.
To confirm, select D6 and check that its formula reads =B6*(1-$E$2)*(1+$E$1). Only the B reference should have changed.
Summary of the rules
- A dollar sign locks the part of the address that follows it.
$E$1locks both column and row, so it never changes when copied or filled.- Use absolute references for single fixed inputs, totals used as denominators, and lookup tables.
- Cut and paste does not rewrite references. Inserting or deleting rows and columns does update them, absolute or not.
- Fill and copy a formula, then inspect the last cell to confirm the references behaved as intended.
Exercise
A sheet has quantities in B2:B20 and a unit price in cell F1. In C2 you write =B2*F1 and fill down to C20. C2 is correct, but C3 shows 0. (a) Explain why. (b) Write the corrected formula for C2. (c) What would the formula in C20 read after you fill the corrected version?
Show answer
(a) Both references are relative, so filling down one row changes F1 to F2 in C3. F2 is empty and counts as 0, so the product is 0. (b) =B2*$F$1. (c) =B20*$F$1. B2 shifts by 18 rows to B20, while $F$1 is locked.
Exercise
B2:B10 holds sales figures and you enter =B2/SUM(B2:B10) in C2, then fill down. What does the formula in C4 read, and why are the percentages wrong? Write a corrected C2 formula.
Show answer
C4 reads =B4/SUM(B4:B12). The SUM range is relative, so it slides down with every row and the denominator is different in each row (and includes cells outside the data). The corrected formula is =B2/SUM($B$2:$B$10), which keeps the same total in every row.
Exercise
You write =$B$2*$E$1 in D2 and fill down to D10. The whole column shows the same number. What went wrong, and how do you fix it?
Show answer
B2 is locked as well as E1, so every row multiplies the first price by the rate. Only the rate should be absolute. Change D2 to =B2*$E$1 and fill down again.