How to Keep Cells From Moving in Excel
In this article
The quickest way to keep cells from moving in Excel is to lock the cells you want protected, then turn on sheet protection: select the cells you need editable, press Ctrl+1, open the Protection tab, untick Locked, then go to Review > Protect Sheet and set a password. If you only mean that formulas shift when you copy them, put dollar signs in the references (for example $A$1) instead. The two fixes solve different problems, so start by deciding which one you are hitting. Note that menu labels and wording can differ slightly between Excel versions, platforms and regions.
What You'll Need
- A workbook saved in .xlsx format (or .xlsm if it contains macros). Some protection options are limited in older .xls files.
- Excel for Windows or Mac, or the mobile app for the parts that support sheet protection.
- A password you will remember for real protection, or none at all for casual protection.
Step-by-Step
- Identify the problem first. If cells physically jump position when you scroll, sort or insert rows, you want protection. If formulas change when copied or dragged, you want absolute references. Most people who say "my cells keep moving" actually mean the second one.
- For formula drift, add dollar signs. Click the cell containing the formula, then in the formula bar click the reference you want to fix (such as A1) and press F4. Pressing F4 cycles through A1, $A$1, A$1 and $A$1 so you can lock the column, the row or both. On a Mac laptop without a function key row, press Fn+F4 or type the dollar signs manually. Press Enter to confirm.
- Copy the corrected reference down and across. With $A$1 locked, dragging the fill handle no longer changes the row or column. This is the single most common fix for "cells moving" complaints.
- For layout protection, unlock the input cells. Select every cell users should be allowed to edit. Press Ctrl+1 to open Format Cells, go to the Protection tab, and untick Locked. Leave the cells you want to freeze locked. Be aware that locked by default is on for every cell, but the lock does nothing until sheet protection is switched on.
- Protect the sheet. Go to the Review tab and click Protect Sheet. In the dialog, type an optional password, then tick the actions you want to allow, such as selecting locked cells and selecting unlocked cells. Click OK and confirm the password if you set one.
- Test before you share. Try typing into a locked cell and confirm Excel refuses the edit, then type into an unlocked cell and confirm it works. Also try copying, inserting rows and sorting to verify the permissions match what you intended.
- Prevent structural changes. If users should not insert, delete, rename or move sheets, go to Review > Protect Workbook and choose the options you need. This stops whole worksheets from being rearranged, dragged between workbooks or deleted.
- Keep header rows in view separately. If cells only appear to move because you lose your place when scrolling, use View > Freeze Panes > Freeze Top Row or Freeze First Column. This does not change the data, but it stops the labels wandering off screen.
- Turn protection off when editing. To change the sheet again, go to Review > Unprotect Sheet and enter the password. Unprotect Workbook follows the same pattern.
Common Mistakes
- Protecting the sheet before unlocking the input cells, which makes the whole sheet read-only and leaves users unable to type anywhere.
- Thinking the Locked checkbox alone protects cells. It only takes effect after Protect Sheet is switched on.
- Using absolute references everywhere out of habit, so column headers or row labels stop tracking correctly when you fill across the sheet.
- Forgetting that sheet protection is not encryption. Anyone can copy the data out, and the password can be removed with tools that remove protection. It stops accidental edits, not determined users.
- Protecting a workbook and then wondering why sheet tabs cannot be renamed or dragged. That is Protect Workbook, not Protect Sheet.
- Saving a protected workbook as .xls, where some protection options quietly behave differently, instead of keeping .xlsx.
- Setting a password that nobody records, which locks the file against the people who need it later.
Tips
- Select a whole range before pressing Ctrl+1 to unlock many input cells in one pass instead of one at a time.
- Color unlocked cells a light fill, such as pale yellow, so users can see where they are allowed to type.
- Use named ranges for fixed tables or often-used cells. A name stays put even when rows are added above it, unlike a plain reference.
- Prefer a simple password or none for internal templates and a stronger one for files sent outside your team.
- Use F4 inside the formula bar repeatedly to cycle reference types rather than retyping dollar signs, which avoids typos.
- Test in a copy of the file before protecting the original, so a mistake in permissions does not block your own work.
- If you protect a sheet, review the allowed actions carefully. Leaving Insert Rows allowed when users should not change layout is a frequent slip.
Troubleshooting
Cells still move when copied. Check whether the reference really has both dollar signs. A$1 keeps the row fixed but lets the column change, and many people accidentally land on this state while pressing F4. Click the reference in the formula bar and press F4 until you see $A$1.
Protect Sheet is greyed out. The workbook may already be protected, or you may be editing a shared workbook where protection behaves differently. Go to Review and unprotect the workbook first, or close and reopen the file if it was opened read-only.
You cannot type anywhere in the sheet. Every cell is probably locked. Unprotect the sheet with Review > Unprotect Sheet, unlock the input cells, protect again, and allow select-unlocked-cells.
You forgot the password. Excel does not offer a recovery path for a sheet password. Test the file in a copy and, if needed, rebuild the sheet or remove protection using a supported method for your version. Never guess on the only copy of important data.
Protection seems to vanish after opening. The file may have been saved as a format that does not carry the same settings, or a macro may be unprotecting on open. Save as .xlsx or .xlsm and check any macros your workbook contains.
Freeze Panes does nothing. Make sure you click a cell below and right of the rows and columns you want frozen, then choose Freeze Panes, or use the top-row and first-column presets.
Frequently Asked Questions
Does locking a cell stop formulas from recalculating?
No. Protection blocks edits, not recalculation, so formulas continue to update when the input cells they depend on change.
Can someone break sheet protection?
Sheet protection stops accidental changes, not a determined person. It is not encryption. Use file-level protection and restricted sharing for confidential data.
What is the difference between Protect Sheet and Protect Workbook?
Protect Sheet stops edits to cells and their permissions. Protect Workbook stops structural changes such as adding, deleting, renaming or moving sheets.
Do dollar signs work in Excel on mobile?
Yes, absolute references behave the same. The mobile app does not have an F4 key, so type the dollar signs manually into the formula bar.
Why do my cells move when I sort?
Sorting rearranges rows and can break formulas that rely on fixed positions. Use structured references or absolute references, and sort the whole table rather than a single column.
Can I lock just one cell?
Yes. Unlock every cell you want editable, leave the rest locked, then turn on Protect Sheet. Only the locked cells will refuse edits.