How to Lock Headers in Excel: Freeze Rows and Columns
In this article
Yes, you can lock headers in Excel in a few clicks using Freeze Panes. Excel freezes everything above and to the left of the cell you select, so placing your cursor just below the header row (or just right of the header column) keeps those labels on screen while the rest of the sheet scrolls. Locking the view like this is different from protecting cells: freezing is a display setting, while protection actually prevents edits. This guide covers freezing rows, columns and both at once, plus what to do when it misbehaves.
What You'll Need
- Microsoft Excel on Windows, macOS, or Excel for the web, or the Excel mobile app on iPhone, iPad or Android.
- A spreadsheet with at least one header row (or column) that should stay visible.
- The file saved somewhere local or in OneDrive; no add-ins are required.
Step-by-Step
Freeze a Single Header Row
- Open your workbook and click the sheet tab with the headers you want to lock.
- Click the row number of the row below your header. If row 1 holds your headings, click the "2" on the left edge. Excel freezes everything above the selected row, so selecting the header row itself would freeze nothing.
- Go to the ribbon tab View.
- In the Window group, click Freeze Panes, then choose Freeze Panes from the dropdown. The top options, Freeze Top Row and Freeze First Column, are shortcuts that work only when row 1 or column A is the header.
- Scroll down. The header row stays put while the data moves, and a thin line marks the frozen boundary.
Freeze a Header Column
- Click the column letter immediately to the right of the header column. If column A holds labels you want locked, click "B".
- On the View tab, open Freeze Panes and select Freeze Panes.
- Scroll right to confirm the header column remains visible.
Freeze Rows and Columns at the Same Time
- Click the single cell diagonally below and to the right of your headers. With a header row in row 1 and a header column in column A, click cell B2.
- Go to View > Freeze Panes > Freeze Panes.
- Both the top rows and the left columns stay in place while you scroll in either direction.
Freeze Several Header Rows or Columns
- Decide where the frozen block should end. For three header rows, the boundary sits between rows 3 and 4.
- Click the first cell that should scroll. For a three-row header, click cell A4.
- Apply View > Freeze Panes > Freeze Panes. Everything above row 4 now stays locked.
Unfreeze or Adjust the Lock
- Go to View > Freeze Panes and click Unfreeze Panes. The command reads "Unfreeze Panes" once something is frozen.
- To move the boundary, unfreeze first, then select a new cell and freeze again. There is no drag handle for changing the frozen area.
On Excel for the Web and Mobile
- In Excel for the web, open the View tab and use Freeze Panes on the home ribbon; the choices mirror the desktop version, though exact labels can differ slightly by version and region.
- On iPhone, iPad and Android, the freeze options live under the View tab of the mobile ribbon. Select the cell below and right of your headers before tapping the freeze command, because the mobile app freezes relative to the active cell.
Common Mistakes
- Selecting the header row instead of the row below it. This is the most frequent error. Freezing works above the selection, so clicking row 1 freezes nothing visible.
- Being in the wrong cell. Freeze Panes acts on the active cell. If you clicked somewhere in the middle of the data by accident, the freeze boundary lands in the wrong place.
- Expecting freezing to stop edits. Frozen headers are still editable. To lock cells against changes, use Review > Protect Sheet, optionally setting a password first.
- Assuming the setting follows the whole workbook. Freezing applies per sheet. Each tab needs its own freeze.
- Confusing freeze with the print title. Frozen rows do not automatically repeat on printed pages. Set those separately under Page Layout > Print Titles.
- Freezing an empty row. If your real headers start on row 3 and rows 1-2 are blank, freeze below row 3, not below row 1.
Tips
- Remove merged cells above and beside your header row. Freezing combined with merges often produces a crooked or partial freeze line.
- Keep header rows few and shallow, so the frozen area does not eat screen space on a laptop.
- Use Freeze Top Row for quick adjoining blank sheets where you only need row 1 visible.
- Convert your range to a table (Insert > Table). Scrolling within a table shows column headings in place of the column letters on the desktop version.
- If you use a header row that appears on many sheets, freeze each sheet after copying the layout rather than re-creating it manually.
- Combine freezing with split panes only when you need two independently scrolling regions; the two features can conflict visually.
Troubleshooting
Freezing seems to do nothing
Check which cell was active. Scroll to the top-left of the sheet and click a cell just below and right of your headers, then reapply. Also confirm you are on the intended sheet tab rather than a similarly named duplicate.
The freeze line sits in the wrong place
Unfreeze, then click with care. If a frozen area still appears, your view may be in Page Layout mode; switch to View > Normal to see freezing behave as expected.
The Freeze Panes button is greyed out
This usually happens inside cell edit mode or when a dialog box is open. Press Esc to leave edit mode. It can also occur in some protected or shared views; unprotect the sheet (you will need the password if one was set) or work on a personal copy.
Headers show but the wrong columns scroll
Your freeze boundary is likely inside the data. Unfreeze and re-select the exact corner cell below and right of the headers. Verify that no hidden rows sit between the header block and your selection.
Freezing disappears after reopening the file
Freeze settings save with the workbook, so a lost freeze usually means the file was closed without saving, or a different copy or version was opened. Save, close, and reopen to test. Shared or co-authored files can also lose view settings when another user changes the layout.
Nothing works
Close and reopen Excel, or restart the device. Confirm you are running a current version through your update settings. As a last resort, copy the sheet data into a fresh workbook and freeze again; this clears odd view states without touching your source file.
Frequently Asked Questions
Does freezing headers change the data for other people?
No. Freezing is a view setting and does not alter cell contents. In co-authored files, other people may see their own view rather than yours.
Can I freeze more than one header row?
Yes. Select the first cell below the last header row you want frozen, then apply Freeze Panes. Everything above it stays visible.
Does freezing stop someone editing the header?
No. Use sheet protection if you need to restrict editing. Remember that protection is a convenience measure, not strong security.
Will frozen headers print on every page?
Not automatically. Set repeating rows or columns under Page Layout > Print Titles, and check the print preview.
Can I freeze headers on Excel for the web?
Yes. The View tab includes Freeze Panes. Labels can differ slightly between versions, so look for the freeze command rather than an exact wording.
Why is only half of my header row frozen?
That indicates the active cell was placed mid-row. Unfreeze and select a cell in column A on the first scrolling row, then freeze again so the full header row is included.