How do I stop a cell reference from changing when I copy a formula to other cells?
Adding a $ before the column letter, the row number, or both locks that part of a reference so it stays fixed when the formula is copied: =B2*$D$1 always multiplies by whatever is in D1, no matter which row the formula is copied to.
Formula (Excel and Google Sheets)
=B2*$D$1By default, a cell reference like B2 is relative: if you copy a formula containing B2 down one row, it becomes B3, then B4, and so on, shifting with the formula. That is usually what you want, but not when a formula needs to always point at the same fixed cell, like a tax rate or exchange rate stored in one place. Adding $ before the column letter, the row number, or both (as in $D$1) locks that part so it does not shift when copied.
$D$1 locks both the column and the row, which is the most common case: a single fixed cell used across an entire column of formulas. $D1 locks only the column (the row still shifts), and D$1 locks only the row (the column still shifts), which matters for formulas copied both across and down, like in a multiplication table.
Step by step
- 1
Identify which cell should stay fixed
This is usually a single value, like a rate or a lookup table, referenced by every row.
- 2
Add $ before the column letter and row number
e.g. change D1 to $D$1 to lock both, so it does not shift when copied.
- 3
Copy the formula down or across
Confirm the locked reference stays the same in every copy, while any other, unlocked references still shift normally.
Common questions
What is the fastest way to add the $ signs?
Click into the reference inside the formula bar and press F4 (Excel) to cycle through relative, fully absolute, and mixed reference styles. Google Sheets uses the same F4 shortcut on most systems.
What is the difference between $D1 and D$1?
$D1 locks the column only, so the column stays D while the row still shifts when copied. D$1 locks the row only, so the row stays 1 while the column still shifts.
Related formulas
How to Build a Running Total (Cumulative Sum) Down a Column
RelatedHow to Use SUMIF and SUMIFS in Excel and Google Sheets
RelatedHow to Calculate Percentage Change Between Two Numbers
From the blogHow to Make Sense of Your Spreadsheet Data Without Being an Analyst
Want a formula written for your exact spreadsheet, not a generic example?
Try the free formula generator