How to freeze rows and columns in Excel

How to freeze rows and columns in Excel

Use Excel's Freeze Panes controls to keep headers or key columns visible while you scroll. You can lock the top row, the first column, or a custom set of rows and columns by placing the active cell and choosing Freeze Panes; use Unfreeze Panes to remove the locks. The instructions below cover Excel on Windows, Excel for the web, and guidance for Mac users, with keyboard tips and a worked example.

What Freeze Panes does and when to use it

Freeze Panes locks rows above and columns to the left of the active cell so those cells remain visible as you scroll. Use it when a worksheet has long lists, table headers, or a key identifier column you need in view while examining rows far below or columns far to the right.

Step-by-step: Freeze the top row, first column, or custom panes

These steps apply to recent versions of Excel on Windows and to Excel for the web. The ribbon names are the same: View > Freeze Panes.

Freeze the top row

  1. Open the worksheet and make sure row 1 contains the header you want to keep visible.
  2. On the ribbon, select View, then click Freeze Panes and choose Freeze Top Row.
  3. Scroll down to confirm row 1 stays fixed while other rows scroll.

Freeze the first column

  1. Confirm column A contains the key values you want to keep visible.
  2. Go to View, click Freeze Panes and choose Freeze First Column.
  3. Scroll right to check column A remains visible.

Freeze rows and columns together (custom)

  1. Click the cell immediately below the row(s) you want frozen and immediately to the right of the column(s) you want frozen. For example, click cell B2 to freeze row 1 and column A simultaneously.
  2. On the ribbon choose View > Freeze Panes > Freeze Panes.
  3. Scroll vertically and horizontally to ensure everything above and left of the selected cell remains visible.

Unfreeze panes

  1. Go to View > Freeze Panes.
  2. Choose Unfreeze Panes to remove any active locks.

Keyboard shortcuts

Keyboard shortcuts speed the process, especially when you repeat the action frequently. On Windows you can use the ribbon key tips to open the Freeze Panes menu with a few keystrokes rather than reaching for the mouse.

For a broader set of productivity keystrokes see Essential Excel Keyboard Shortcuts.

Split panes vs Freeze Panes

Excel also offers Split, which looks similar but behaves differently. Use the list below to decide which to use.

To add a split, go to View > Split. To remove it, select View > Split again or double-click a splitter bar.

Worked example: keep header row and ID column visible

Scenario: You have a large sheet with column A for "Employee ID" and row 1 contains column headings. You want both the header row and the ID column visible while you work on distant cells.

  1. Click cell B2 (this is the cell directly below row 1 and directly to the right of column A).
  2. On the ribbon choose View, then Freeze Panes, then Freeze Panes again.
  3. Verify that row 1 and column A remain visible as you scroll right and down.

If you later add or remove rows above the top of your dataset, reapply Freeze Panes after adjusting the layout so the correct rows and columns are locked.

Common mistakes and a short checklist

These issues are frequent; check them if Freeze Panes does not work as expected.

Quick checklist before freezing:

  1. Unhide any rows or columns that should be considered in the freeze boundary.
  2. Unmerge cells that straddle the freeze line, or adjust the selection.
  3. Set the active cell precisely where you want the split of frozen and scrolling areas to occur.

When to use Freeze Panes vs other approaches

If your data is a formal Excel table (Insert > Table), Excel also offers Filter and Sort controls that behave well with headers; consult Filter and Sort Data in Excel for how that interacts with visible headers. If you need to restrict editing rather than just view headers, learn how to lock cells and protect a sheet in How to Lock Cells and Protect a Worksheet in Excel.

Closing

Freeze Panes is a simple but powerful view tool: top row and first column commands solve many common use cases, while custom Freeze Panes lets you lock any combination of rows and columns. Use the ribbon commands or the Windows ribbon key tips for speed, check the common issues list if Freeze Panes fails, and remember Split if you need independent scroll panes. Reapply or unfreeze as you change the structure of your worksheet.