How to Lock a Cell Reference in an Excel Formula
Make a formula follow each new row while keeping one rate fixed. Try the F4 shortcut, compare dollar-sign positions and check the copied results.
Follow these steps at your own pace. Check product terms and prices directly with providers before purchasing.
Quick answer
Put a dollar sign before both the column letter and the row number of the reference that should stay fixed. In
=B2*$E$2, copying the formula down changes B2 to B3 and keeps $E$2 in place. In Excel for Windows, select a reference while editing the formula and press F4 to cycle through the options.
1. Separate the changing amounts from the shared rate
In a blank sheet, put Amount in B1 and Discount in C1. Type 100 in B2 and 60 in B3. Put Rate in E1 and type 10% in E2, including the percent sign. You want each amount to supply its own row number, while both calculations use the single rate stored in E2.
2. Fix only the rate reference
Click C2 and type =B2*E2. Before pressing Enter, highlight just E2 in the formula bar and press F4 once. Check that the formula reads =B2*$E$2, then press Enter. The first discount should be 10. If your keyboard uses F4 for a hardware control, try Fn+F4 or type the two dollar signs directly.
The dollar signs control what happens when you copy a formula. They have no effect on currency formatting or on who can edit the rate.
| Reference | Copied down one row | Copied right one column |
|---|---|---|
| E2 | E3 | F2 |
| $E$2 | $E$2 | $E$2 |
| E$2 | E$2 | F$2 |
| $E2 | $E3 | $E2 |
3. Inspect the second formula
Select C2 and drag the small square at its lower-right corner down to C3. Click C3 and read the formula bar. You should see =B3*$E$2 and a result of 6. If both rows show 10, check whether you fixed B2 as well. If the second result is zero, the rate reference may have moved to an empty E3.
4. Change the rate once to test both rows
Replace 10% in E2 with 15%. The discounts should become 15 and 9. This is a useful check before extending the formula down a long list. For the amount left after the discount, use =B2-C2 in D2 and fill down. The two remaining amounts are 85 and 51.
When is one dollar sign enough?
If January’s rate is in E2 and February’s rate is in F2, use E$2 for the rate in a formula that you plan to copy across months. Excel will move to the next column while continuing to read row 2.
Microsoft Support · Switch between relative and absolute references
Comments
Read or join the discussion.