How to Lock Cells in Excel So You Can Scroll

How-to basics · Updated November 18, 2026

To keep headings or identifying columns visible while you scroll through a worksheet, use Freeze Panes: select the cell just below the rows and to the right of the columns you want to keep on screen, then choose View > Freeze Panes > Freeze Panes. Excel keeps the rows above and columns to the left in place while the rest of the sheet moves. This is different from protecting cells against editing.

What You’ll Need

  • Microsoft Excel for Microsoft 365 on Windows and a workbook with the rows or columns you want to keep visible.
  • Permission to change the workbook view. You do not need a password or to protect the worksheet.

The instructions below are for Excel on Windows. Freeze Panes is also available in Excel for Mac and Excel for the web, although the ribbon layout can differ slightly. If you mean preventing people from changing cell contents rather than keeping them visible, see the tips and FAQ below.

Step-by-Step

  1. Open the worksheet and identify what should stay visible. Decide whether you need a header row, a label column, or both. For example, a sales sheet might have column headings in row 1 and customer names in column A. Keeping those labels visible makes it easier to understand values farther down or across the sheet.

  2. Choose the first cell outside the area to freeze. Excel freezes entire rows above the selected cell and entire columns to its left. If you want to keep row 1 visible, select a cell in row 2. If you want to keep column A visible, select a cell in column B. To keep row 1 and column A visible together, select B2. The selected cell itself is not frozen.

  3. Use the Freeze Panes command. On the Windows ribbon, open the View tab, select Freeze Panes in the Window group, and select Freeze Panes from the menu. Do not choose Freeze Top Row or Freeze First Column unless one of those presets matches what you want. Excel draws a boundary to show the frozen area.

  4. Check the result by scrolling. Use the mouse wheel or the vertical scroll bar to move down, and the horizontal scroll bar to move sideways. The frozen rows should remain at the top and the frozen columns should remain on the left. The rest of the worksheet should move independently. If the wrong area stays put, unfreeze it and repeat the selection step carefully.

  5. Use a preset for a single top row. If your only goal is to keep the first row visible, choose View > Freeze Panes > Freeze Top Row. You do not need to select a cell first. This preset freezes row 1, not whichever row currently contains a heading. If your headings are in row 3, select a cell in row 4 and use Freeze Panes instead.

  6. Use a preset for a single first column. Choose View > Freeze Panes > Freeze First Column to keep column A visible as you scroll horizontally. This does not freeze column B or a selected column elsewhere in the worksheet. To freeze more than the first column, select a cell in the next column after the columns you want to retain and choose Freeze Panes.

  7. Change or remove the frozen area when needed. Return to View > Freeze Panes and choose Unfreeze Panes. Then make a new selection and apply Freeze Panes again. Excel allows one freeze configuration per worksheet view; applying a different one requires removing the current freeze first.

  8. Save the workbook. Save your changes with Ctrl+S on Windows. The freeze setting is part of the workbook view, so saving helps preserve the setup for later. On a Mac, use Command+S. In Excel for the web, changes are generally saved automatically, but check the save status before closing the browser tab.

Example: Suppose a worksheet has titles in row 1 and months in columns A and B, and you want those labels to remain visible. Select C2, then choose View > Freeze Panes > Freeze Panes. Row 1 stays at the top, columns A and B stay on the left, and the data area to the right and below can scroll.

Common Mistakes

Selecting the area you want to freeze instead of the cell after it. Excel interprets the selection as a boundary. To retain rows 1 through 3 and columns A through C, select D4 before choosing Freeze Panes. Selecting C3 would keep only rows 1 and 2 and columns A and B. A reliable check is to look at the row number and column letter of your selected cell before applying the command.

Expecting Freeze Panes to lock an individual cell. Freeze Panes works with complete rows above and complete columns to the left of the selected cell. It cannot keep one isolated cell in the middle of a sheet visible while other cells scroll. It also cannot freeze a scattered set of rows, such as rows 1 and 5 while leaving rows 2 through 4 moving.

Confusing a frozen view with worksheet protection. Freezing affects what remains on screen; it does not stop someone from editing values. Conversely, locking cells and protecting a sheet can restrict editing, but do not keep those cells visible during scrolling. These are separate features and can be used together when both outcomes are needed.

Using a preset when headings are not in the first row or column. Freeze Top Row always means row 1, and Freeze First Column always means column A. If your headings start lower down or farther to the right, use a carefully chosen cell with the general Freeze Panes command instead.

Tips

Freeze only what you need. Keeping a few title rows and one or two label columns visible usually leaves enough room to read the worksheet. Freezing a large block can make the scrolling area feel cramped, especially on a laptop screen. You can adjust the boundary by unfreezing and choosing a closer selection.

Use the row and column headings to plan the selection. To retain rows 1–2 and columns A–B, select C3. To retain only rows 1–2, select A3; to retain only columns A–B, select C1. These examples follow the same rule: the boundary is immediately below and immediately right of the frozen section.

Check the worksheet at different scroll positions. Test both directions if you froze both rows and columns. Scroll down far enough to leave the original headings behind, then scroll right far enough to leave the first columns behind. This confirms the frozen labels still make sense with the data currently in view.

Use protection only when you also need to prevent edits. Excel cells are marked as locked by default, but that setting does not restrict editing until you protect the worksheet. To apply protection, review Review > Protect Sheet and choose the actions users are allowed to perform. Protecting a sheet is optional for Freeze Panes, and it can affect what users can change.

Expect minor layout differences on other platforms. In Excel for Mac, look for View > Freeze Panes; the exact ribbon arrangement can vary by release. Excel for the web also provides Freeze Panes from the View tab. If you do not see the command, check that you are editing the workbook in Excel rather than viewing a read-only preview.

Troubleshooting

The wrong rows or columns are frozen: Choose View > Freeze Panes > Unfreeze Panes, click the correct boundary cell, and apply Freeze Panes again. Remember that a selection at C4 freezes rows 1–3 and columns A–B. The row and column containing the selection are not included.

The freeze command is unavailable or does not respond: Exit cell-editing mode by pressing Enter or Esc, then try the View tab again. If the workbook is read-only or opened in a restricted preview, switch to editing mode or save an editable copy if you have permission. Also check whether a dialog box is open and waiting for input.

Nothing appears to stay in place: Try scrolling with the worksheet’s scroll bars and look for a boundary between the frozen and moving areas. If you applied Freeze Top Row but your header is lower in the sheet, unfreeze and use the general command with a cell immediately below the actual header rows. If you froze columns, test horizontal scrolling rather than only scrolling down.

The sheet is hard to use because too much is frozen: Unfreeze the panes and create a smaller frozen area. Freeze Panes does not provide a separate drag handle for changing the boundary after the fact; the practical way to revise it is to unfreeze and apply the command again using a different cell.

Frozen panes seem to have disappeared after switching views: Return to the worksheet and check the View tab for the active Freeze Panes setting. If necessary, reapply the freeze and save. If multiple workbook windows or views are open, confirm you are looking at the intended sheet and window rather than another view of the workbook.

Frequently Asked Questions

Can I lock a row and a column at the same time?
Yes. Select the cell one row below and one column to the right of the area to retain. For example, select B2 to freeze row 1 and column A, then choose View > Freeze Panes > Freeze Panes.

Can I freeze rows that are not at the top?
Not as a separate middle section. Freeze Panes keeps rows from the top of the worksheet through the row immediately above your selection. If you select a cell in row 5, rows 1 through 4 stay visible together.

Does freezing panes stop other people from changing cells?
No. It only keeps selected rows or columns visible while scrolling. To limit editing, use worksheet protection separately; freezing and protection solve different problems.

Can I freeze panes on a Mac or in Excel for the web?
Yes. Look for Freeze Panes on the View tab in both versions. The menu layout may differ from Windows, but the selection rule is the same: choose the cell below and to the right of the rows and columns to keep visible.

How do I freeze the first two rows and first column?
Select B3, then choose View > Freeze Panes > Freeze Panes. The rows above B3 (rows 1 and 2) and the column to its left (column A) remain visible.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.