Data ManagementBeginner4 min read

How to Lock Rows in Excel: Freeze and Protect

Keep Excel rows visible while scrolling, protect controlled cells from edits, and leave designated input rows editable.

To lock rows in Excel, use the control that matches your goal:

  • To keep rows visible while scrolling, select the cell below them and choose View > Freeze Panes > Freeze Panes.
  • To prevent edits, unlock the input cells, leave the controlled cells marked Locked, and choose Review > Protect Sheet.

This guide shows finance and FP&A users how to keep rows 1-6 visible, protect Work Tracker!A1:F6, and leave Work Tracker!A7:F12 editable.

What You'll Need

Step-by-Step Guide

1

Freeze the rows you want to keep visible

On the Work Tracker sheet:

  1. Select A7, immediately below rows 1-6.
  2. Choose View > Freeze Panes > Freeze Panes.
  3. Scroll down and confirm that rows 1-6 remain visible.

Excel freezes the rows above the selected cell and the columns to its left. When you select A7, rows 1-6 freeze without any columns freezing. If you selected B7 instead, Excel would also freeze column A.

Microsoft explains this selection behavior in its Freeze Panes guidance.

Weekly task tracker with summary and header rows above six editable task rows.

Select A7 and apply Freeze Panes to keep rows 1-6 visible; unlock A7:F12 before protecting the sheet.

    2

    Unlock the rows users should be able to edit

    Excel cells are marked Locked by default, but that setting isn’t enforced until you protect the worksheet.

    To keep the task-entry area editable:

    1. Select Work Tracker!A7:F12.
    2. Right-click and choose Format Cells, or press Ctrl+1.
    3. Open the Protection tab.
    4. Clear Locked.
    5. Select OK.

    Next, select A1:F6 and confirm that Format Cells > Protection > Locked remains selected. After you enable protection, this summary and header area should resist ordinary edits.

      3

      Protect the worksheet

      Now enforce the Locked settings:

      1. Choose Review > Protect Sheet.
      2. Keep Select unlocked cells enabled.
      3. Choose any other actions users should be allowed to perform.
      4. Enter a password only if your workbook process requires one.
      5. Confirm the protection settings.

      Protection applies to the entire worksheet, so cells outside A7:F12 will also resist ordinary edits unless you unlock them before protecting the sheet.

      If you use a protection password, store it securely. Worksheet protection helps prevent unwanted changes, but it isn’t encryption and doesn’t replace file-access controls. See Microsoft’s worksheet protection guidance.

        4

        Verify scrolling, editing, and calculations

        Test the two controls independently:

        1. Scroll below row 12. Rows 1-6 should remain visible.
        2. Change a value in A7:F12. Excel should accept the edit.
        3. Try changing A1 or another cell in A1:F6. Excel should reject the edit while protection is active.
        4. Choose Review > Unprotect Sheet. Rows 1-6 should remain frozen because worksheet protection and Freeze Panes operate separately.

        If you’re using the supplied practice workbook, check that its summaries respond to an input change:

        1. Change C8 from 5 to 6.
        2. Change D8 from Open to Done.
        3. Confirm these displayed results:
        CellExpected value
        B36
        D34
        F32
        B418
        D40.67
        F40

        After the check, restore C8 to 5 and D8 to Open. These expected values come from the supplied workbook’s recorded calculation case. They confirm that its formulas respond to input changes, but they don’t confirm that Excel’s Freeze Panes or worksheet protection settings are active.

        Compact guide comparing frozen rows with rows protected against editing.

        Freezing controls scrolling, while sheet protection enforces the Locked property.

        For related guidance on separating controlled calculations from editable inputs, see how to choose and set up finance spreadsheet templates.

          Wrapping Up

          Selecting A7 before applying Freeze Panes keeps rows 1-6 visible. To preserve an editable task-entry area, unlock A7:F12 before protecting the worksheet. Locked cells such as A1:F6 will then resist ordinary edits.

          Freeze Panes controls visibility. Locked cells combined with Protect Sheet control editing.

          Frequently Asked Questions

          Why can I still edit cells marked Locked?

          The worksheet may not be protected. The Locked property takes effect only after you choose Review > Protect Sheet.

          Why are the wrong rows frozen?

          Choose View > Freeze Panes > Unfreeze Panes. Then select the cell immediately below the rows you want to keep visible and apply Freeze Panes again.

          Why can’t I edit my input rows after protecting the sheet?

          Unprotect the sheet, select the input range, and clear Locked under Format Cells > Protection. Then protect the sheet again with Select unlocked cells enabled.

          Does Freeze Panes prevent formula edits?

          No. Freeze Panes only controls what remains visible while scrolling. To restrict formula edits, leave the formula cells Locked and protect the worksheet.

          What if I forget the worksheet-protection password?

          Use the securely retained password or an authorized unprotected backup. This guide doesn’t provide a supported recovery or protection-bypass method.

          Does Protect Sheet secure confidential financial information?

          No. Worksheet protection helps prevent unwanted edits, but it doesn’t replace workbook encryption or file-access permissions.