Locking a row in Excel means freezing it so it stays visible while you scroll vertically through the rest of the sheet. This is especially helpful for keeping headers (like column titles) in view when working with large datasets. No special tools or add-ins are required—this feature is built into Excel for Windows, Mac, and web versions.
What You'll Need
- Microsoft Excel (any recent version: 2010, 2013, 2016, 2019, 2021, Microsoft 365, or Excel for the web)
- An open Excel workbook with at least one row of data
- A clear idea of which row you want to freeze (typically row 1 for headers)
Step-by-Step
- Open your Excel workbook and navigate to the worksheet where you want to lock a row.
- Click on the row number of the row directly below the one you want to freeze. For example, if you want to freeze row 1 (the header row), click the row number for row 2. This tells Excel exactly where to split the pane.
- Go to the View tab on the Excel ribbon at the top of the window.
- In the Window group, click Freeze Panes.
- From the dropdown menu that appears, select Freeze Panes (not "Freeze Top Row" unless you specifically want only row 1 frozen and your cursor is already in row 2).
- Excel will now lock all rows above the selected row. You’ll see a thin horizontal line (freeze bar) separating the locked row(s) from the scrollable area. Scroll down to confirm the top row(s) remain visible while the rest of the sheet moves.
Common Mistakes
- Clicking the wrong row number before freezing—remember, Excel freezes everything above the active cell’s row, not the selected row itself.
- Using "Freeze Top Row" when you need to freeze multiple rows (e.g., headers plus a subtotal row). In that case, you must select the row after your last header row and use "Freeze Panes".
- Forgetting to uncheck any existing panes: if you previously froze columns or both rows and columns, the freeze may not behave as expected. Always clear existing panes first if unsure (see Troubleshooting).
- Assuming the freeze works horizontally—freezing rows only locks vertically. To lock columns for horizontal scrolling, you must freeze columns separately (or use "Freeze Panes" after selecting a cell in the column to the right of the desired frozen area).
Tips
- To freeze both the top row and the first column, click the cell in row 2, column B (i.e., cell B2), then choose View > Freeze Panes > Freeze Panes.
- When sharing workbooks, note that freeze panes settings are saved with the file—recipients will see the same frozen rows when they open it.
- Use the scroll bar to verify the freeze: drag the vertical scroll bar down and the frozen row(s) should stay fixed at the top.
- For large datasets, consider hiding unused rows below your data to improve performance and reduce scrolling confusion.
- On Excel for the web, the freeze process is identical, but the ribbon may appear slightly different—look for the View tab and Freeze Panes under Window.
Troubleshooting
If your row doesn’t freeze or the wrong rows are locked, try these steps:
- Unfreeze and retry: Go to View > Freeze Panes > Unfreeze Panes, then repeat the steps, double-checking that you selected the correct row number before freezing.
- Check for merged cells: Merged cells in your header row can interfere with freezing. Select the merged area, go to Home > Alignment > Merge & Center > Unmerge Cells, then re-freeze.
- Reset pane splits: Sometimes Excel retains hidden pane splits. After unfreezing, click any cell in row 1, hold Ctrl + Shift + Down Arrow to select all rows below, right-click the row header, and choose Unhide—then try freezing again.
- Restart Excel: Close and reopen the workbook. Occasionally, a temporary UI glitch prevents the freeze from applying correctly.
- Try a different view mode: Switch to Page Layout view (View > Page Layout), freeze panes, then switch back to Normal view. Some users report better reliability this way.
Frequently Asked Questions
Can I lock multiple rows in Excel?
Yes. Select the row immediately below your last row you want to freeze. For example, to freeze rows 1 and 2, click row 3, then choose View > Freeze Panes > Freeze Panes.
Why does my frozen row disappear when I scroll?
It shouldn’t—if it does, you likely froze the wrong area. Double-check that you selected the row below your intended header row before freezing. Also ensure you didn’t accidentally apply "Freeze Top Row" when your cursor was in row 1, which may freeze nothing or behave unpredictably.
Does freezing rows affect printing?
No. Freeze panes only affects screen scrolling. To repeat headers on every printed page, go to Page Layout > Print Titles, then set rows to repeat at top under the Sheet tab.
Can I freeze rows in Excel Online (web version)?
Yes. The steps are nearly identical: go to the View tab, select the appropriate row, click Freeze Panes, and choose Freeze Panes. Note that the ribbon layout may vary slightly depending on your browser and screen size.
How do I unfreeze rows?
Go to the View tab, click Freeze Panes, and then select Unfreeze Panes. This removes all frozen rows and columns in the current workbook window.
Does freezing rows work in Excel for Mac?
Yes. The process is the same: select the row below the one to freeze, go to View > Freeze Panes. On older Mac versions, the menu path is identical; on newer ones with a redesigned ribbon, it’s in the same location.