Formula Errors

How to Lock a Cell Reference When Copying an Excel Formula

Ayan MasoodAyan Masood Oct 21, 2026 873 views

Question details

The user needs to lock a specific cell reference (make it absolute) so it doesn't change when a formula is copied to other rows or columns.

How to Lock a Cell Reference When Copying an Excel Formula
Product
Excel
Device & OS
not provided
Scenario
Copying an existing formula that relies on a fixed total or source cell, causing reference shifts.
Observed behavior
Without locking, relative references shift automatically across rows and columns, causing calculation errors. By locking the cell, it stays fixed across the copied range.
Before you start

Identify which specific cells in your formula need to remain fixed (like a tax rate or grand total) versus the cells that should dynamically update as you copy the formula down or across.

Solution 1Recommended

Use the F4 Shortcut to Create Absolute References

The fastest way to lock a cell reference is by using the F4 key to automatically add dollar signs.

By default, Excel uses relative cell references. Using the F4 shortcut allows you to quickly convert a relative reference into an absolute reference, preventing Excel from automatically adjusting the cell coordinates when pasting.

1
Edit the formula

Double-click the cell containing your formula, or select it and click inside the Formula Bar at the top of the worksheet.

2
Select the reference

Place your text cursor inside or immediately next to the cell reference you want to lock (for example, A1).

3
Apply the F4 shortcut

Press the F4 key on your keyboard. This changes A1 to $A$1, effectively locking both the row and the column.

4
Copy the locked formula

Press Enter to save the formula. Click the cell again, grab the small square fill handle in the bottom-right corner, and drag it to copy the formula to adjacent cells.

Use the F4 Shortcut to Create Absolute References
Cycle Through Reference Types: Continuing to press F4 while your cursor is on the reference cycles through locking just the row (A$1), locking just the column ($A1), and going back to an unlocked relative reference (A1).
Efficient Spreadsheet Calculations

Easily Lock Cell References Using WPS Spreadsheet

WPS Spreadsheet fully supports standard Excel formulas and keyboard shortcuts, allowing you to seamlessly calculate data using absolute references. It provides a familiar interface to lock cells quickly, making data analysis highly efficient.

  1. 1. Open your spreadsheet: Launch WPS Spreadsheet and open the document containing your data.
  2. 2. Select the formula: Select the cell with your formula and click into the formula bar at the top.
  3. 3. Use the shortcut: Place your cursor within the target reference and press the F4 key to apply the absolute $A$1 format.
  4. 4. Drag to fill: Click the fill handle on the bottom-right corner of the cell and drag to copy the locked formula down the column.
100% format compatibility with Microsoft Excel (.xlsx) filesSupports all standard Excel formulas and keyboard shortcuts, including F4Lightweight, fast, and completely free to useBuilt-in intuitive formula checking and error tracing
QA img-9

Frequently Asked Questions

What is the difference between an absolute and a relative reference?

A relative reference (like A1) changes based on its relative position when copied to another cell. An absolute reference (like $A$1) contains dollar signs, locking it so it points to the exact same cell no matter where the formula is copied.

Why isn't my F4 key locking the cell reference?

On some laptops or Mac keyboards, the F4 key may be mapped to media or system controls. Try pressing 'Fn + F4' (or 'Cmd + T' if using a Mac) to toggle absolute cell references correctly.

How do I lock only the row but not the column?

To create a mixed reference that locks only the row, place a dollar sign just before the row number (e.g., A$1). When you copy the formula across columns, the column letter will adjust, but the row number will stay the same.

Can I lock multiple cell references at once?

Yes, you can highlight the entire formula or multiple references within the formula bar and press F4. This will apply absolute reference formatting (dollar signs) to all highlighted cell references simultaneously.