ElyxAI
protection

How to How to Lock Row Height in Excel

Shortcut:Ctrl+1 (Format Cells dialog)
Excel 2016Excel 2019Excel 2021Excel 365Excel Online

Learn how to lock row height in Excel to prevent accidental resizing of rows during data entry or formatting. This tutorial covers using sheet protection to freeze row dimensions, ensuring your spreadsheet layout remains consistent and professional. You'll master both basic protection and advanced options to safeguard specific rows while allowing edits elsewhere.

Why This Matters

Locking row height prevents collaborators from accidentally altering your spreadsheet's visual structure, which is critical for reports, forms, and dashboards where consistency matters.

Prerequisites

  • Basic familiarity with Excel interface and row selection
  • Understanding of sheet protection concepts
  • A spreadsheet with rows you want to protect

Step-by-Step Instructions

1

Select the rows to lock

Click the row number on the left to select entire rows you want to lock, or Ctrl+Click for multiple non-consecutive rows. Your selection will highlight in blue.

2

Open Format Cells dialog

Right-click your selection and choose 'Format Cells' or press Ctrl+1 to open the Format Cells dialog window.

3

Navigate to Protection tab

Click the 'Protection' tab in the Format Cells dialog. You'll see options for 'Locked' and 'Hidden' checkboxes.

4

Enable the Locked option

Ensure the 'Locked' checkbox is checked (enabled). Click OK to apply this setting to your selected rows.

5

Protect the sheet

Go to Review > Protect Sheet (or Tools > Protect Sheet in older versions). Choose options and optionally set a password, then click OK to activate row height protection.

Alternative Methods

Using Format > Row > Height with protection

Set your desired row height via Format > Row > Height, then apply sheet protection immediately after. This prevents height changes but allows other edits on unprotected cells.

Protect all cells then unprotect specific rows

Lock all cells first, then selectively unprotect rows where editing is needed before enabling sheet protection. This grants flexibility while preserving locked row heights elsewhere.

Tips & Tricks

  • Always set row heights to your desired dimensions before applying sheet protection to avoid needing to unprotect and adjust later.
  • Test your protection settings on a duplicate sheet first to ensure users can still edit the content they need to modify.
  • Use descriptive passwords if requiring one—avoid simple passwords that collaborators might guess.

Pro Tips

  • Combine row height locking with column width protection (Format > Column > Width) for complete layout preservation across your dashboard.
  • Use Review > Unprotect Sheet to temporarily remove protection if you need to adjust rows, then re-protect with the same settings.
  • Lock header rows and title rows separately from data rows to maintain formatting while allowing content updates below.

Troubleshooting

Users can still resize rows after protection is enabled

Ensure you selected entire rows and checked 'Locked' in the Protection tab before protecting the sheet. Unprotect, verify the Locked checkbox is enabled, then re-protect.

Cannot unprotect the sheet (password forgotten)

Unfortunately, Excel passwords cannot be recovered if forgotten. Consider recreating the sheet with a remembered password, or use a third-party password recovery tool (results may vary).

Only some rows remain locked while others can be resized

You likely protected the sheet without locking all intended rows. Unprotect, select all rows needing protection, enable 'Locked,' then re-protect the entire sheet.

Frequently Asked Questions

Can I lock row height without locking cell content?
Yes. Enable 'Locked' in the Protection tab for your rows, but before protecting the sheet, uncheck 'Locked' on the specific cells where editing should be allowed. Then protect the sheet—row heights stay locked while content in unprotected cells remains editable.
Will locking row height prevent users from entering data?
No. Row height locking only prevents resizing the row dimensions. Users can still enter, edit, and delete data in cells within locked rows unless you've also applied cell-level protection to those cells.
How do I unlock row height after protection?
Go to Review > Unprotect Sheet (or Tools > Unprotect Sheet), enter the password if set, then click OK. You can now resize rows freely. To re-lock, repeat the lock and protect process.
Is sheet protection the only way to lock row height?
Yes, sheet protection is the standard method in Excel. Without it, users can manually resize rows by dragging the row dividers, so protection is necessary to truly lock dimensions.

This was one task. ElyxAI handles hundreds.

Sign up