To keep a row visible at the top while you scroll in Excel for Microsoft 365 on Windows, select View > Freeze Panes > Freeze Top Row. Excel keeps worksheet row 1 in view as you move down the sheet. If the row you need is lower down, use Freeze Panes with a cell directly beneath it instead. This feature is often called “locking” a row, but it freezes the row on screen; it does not protect its contents from editing.
What You’ll Need
- A workbook open in Microsoft Excel. The instructions below are for Microsoft 365 on Windows; Mac and Excel for the web have similar ribbon options.
- The worksheet where you want the row to stay visible. Freeze settings apply to the active worksheet, not every sheet in the workbook.
- The row number of the heading or information you want to keep on screen. The built-in Freeze Top Row command applies only to row 1.
You do not need to select or format the row in advance, install an add-in, or change the workbook’s protection settings. If you want to keep more than the first row visible, identify the row immediately below the last row you want to freeze.
Step-by-Step
- Open the correct worksheet. Click the sheet tab containing the data, then check that you are viewing the worksheet rather than a chart sheet. Each worksheet can have its own frozen panes, so confirm you are setting the feature on the sheet you will actually scroll. If your workbook has several similar tabs, check the headings before continuing.
- Decide whether the heading is in row 1. If your column labels are in the very first worksheet row, the standard command is the quickest option. If there is a title, blank row, or introductory information above the labels, Freeze Top Row will keep that uppermost row visible instead of the labels. For headings lower down, use the custom freeze method in step 4.
- Choose the built-in command for row 1. On the ribbon, select View > Freeze Panes > Freeze Top Row. In the Freeze Panes menu, choose the item named Freeze Top Row, not Freeze Panes. Excel adds a thin boundary below the frozen row. Scroll down with the mouse wheel, scroll bar, or keyboard, and check that row 1 remains visible at the top of the worksheet.
- Freeze a heading row that is below row 1. First, find the row number directly beneath the heading rows you want to keep visible. Click a cell in column A on that next row, then select View > Freeze Panes > Freeze Panes. For example, if rows 1 through 3 contain a title and column headings, click cell A4 before choosing Freeze Panes. Rows 1, 2, and 3 will remain visible as you scroll down.
- Check that you did not freeze unwanted columns. Freeze Panes freezes all rows above and all columns to the left of the selected cell. That is why A4 is a useful selection when you want to freeze rows 1 through 3 but no columns. If you selected C4 instead, Excel would freeze rows above row 4 and columns A and B as well. Scroll vertically and horizontally to confirm the boundary is where you expect.
- Use the keyboard access keys if you prefer. In many English-language Windows versions of Excel, press Alt, then W, F, and R in sequence to choose Freeze Top Row. These are ribbon access keys, not four keys to hold down together, and they can vary with Excel version, language, or customized ribbon settings. If they do not work, use the View ribbon menu. On Mac, use View > Freeze Panes > Freeze Top Row; there is no matching default shortcut sequence that works across Mac versions.
- Save and confirm the result. Save the workbook if you need to keep your changes. Move down far enough that row 1 or your chosen heading rows would normally leave the screen. The frozen area should stay in place while the worksheet data moves below it. If you cannot see the boundary clearly, check the freeze settings as described in Troubleshooting.
In Excel for Mac, the Freeze Panes options are also on the View tab, though the ribbon layout can look slightly different. In Excel for the web, open the View tab and choose Freeze Panes, then select the relevant freeze command. The custom method works the same way: select a cell below the rows to keep and, if you do not want columns frozen, in column A.
Common Mistakes
- Choosing Freeze Top Row when the heading is not in row 1. This command always freezes worksheet row 1; it does not search for a table heading. If your labels are in row 4, use the custom Freeze Panes method and select A5 first.
- Clicking Freeze Panes without setting the selection correctly. Excel uses the selected cell as a boundary. It freezes rows above that cell and columns to its left. Selecting C4 when you only meant to freeze the top three rows also freezes columns A and B. Select A4 to avoid that extra effect.
- Confusing freezing with cell protection. Frozen rows stay visible while scrolling, but users can still change their values if the worksheet allows editing. To restrict editing, use worksheet protection settings separately; freezing a pane does not secure or lock data.
- Expecting the setting to apply throughout the workbook. Freeze panes are set per worksheet. Freezing row 1 on one sheet does not automatically freeze row 1 on the other tabs. Repeat the steps on each sheet where you need the behavior.
- Using Split instead of Freeze Panes. Split divides the worksheet window into independently scrollable areas. It is not the same as keeping a heading row fixed at the top. For a persistent header while scrolling, use the Freeze Panes commands.
Tips
- Keep the frozen area compact. Freezing several rows can be useful when a report has a title, date, and column labels, but a tall frozen block leaves less room for the data you are reviewing. Freeze only the rows needed to understand the columns below.
- Freeze rows and a key column together when useful. Select a cell below the rows and to the right of the columns you want to preserve. For example, select B4 and choose Freeze Panes to keep rows 1 through 3 and column A visible. The selected cell itself is not the frozen area; the rows above and columns to its left are.
- Use a table for structured data, but do not expect it to freeze automatically. Excel tables offer useful sorting and filtering features, yet their header row is not automatically pinned to the top during ordinary worksheet scrolling. If a table starts below row 1, freeze the rows above its header using the custom method.
- Distinguish on-screen freezing from printing. Freeze Panes affects how the worksheet appears while you work; it does not repeat a header on every printed page. For printed sheets, use Page Layout > Print Titles to set rows to repeat at the top of each page.
- Check the active cell before choosing a command. A stray selection in the middle of the worksheet can make the custom freeze result surprising. Click the intended boundary cell, such as A4, immediately before opening the Freeze Panes menu.
Troubleshooting
The row does not stay visible. Confirm that you selected the correct worksheet and chose View > Freeze Panes > Freeze Top Row. Then scroll down within the worksheet, rather than moving to another sheet or viewing a different workbook window. If row 1 is not the heading you want, unfreeze the current panes and use the custom method with a cell beneath the desired rows.
The wrong rows or columns are frozen. Select View > Freeze Panes > Unfreeze Panes to clear the current setting. Then click the correct boundary cell and choose Freeze Panes again. To keep rows 1 through 3 only, select a cell in row 4, column A. To keep row 1 and column A, select B2. Check the result by scrolling in both directions.
The Freeze Panes menu is unavailable or appears different. Make sure you are in a worksheet view where the command is available, and check whether the workbook is open in a restricted or read-only mode. In Excel for the web or Mac, look on the View tab; ribbon labels or arrangement may differ slightly by version. If a menu item is disabled, close any dialog that is open and return to the worksheet grid before trying again.
The frozen row seems to have disappeared after scrolling sideways. Freeze Top Row keeps the first row visible during vertical scrolling, but it does not freeze columns. When you scroll horizontally, the contents of row 1 move sideways with the rest of the unfrozen columns. If you need a row and a left-side identifier column to remain in view, use Freeze Panes with a cell below and to the right of the areas you want to preserve.
You need the heading on printed pages, not just on screen. Unfreezing or refreezing panes will not change printed page headers. Go to Page Layout > Print Titles, then set the rows to repeat at the top of each page. Use Print Preview to check the output before printing, because page scaling and print areas can affect where the repeated rows appear.
Frequently Asked Questions
Can I freeze a row other than the first row?
Yes. Click a cell in the row immediately below the row or rows you want to keep visible, then choose View > Freeze Panes > Freeze Panes. For example, select A5 to freeze rows 1 through 4 without freezing any columns.
Can I freeze more than one row at the top?
Yes. Select a cell in the row just below the last row to freeze. Selecting A4 and choosing Freeze Panes keeps rows 1, 2, and 3 on screen. The built-in Freeze Top Row command is limited to row 1.
How do I unlock or unfreeze a row?
Choose View > Freeze Panes > Unfreeze Panes. The frozen area will return to normal scrolling. You can then set a different freeze boundary if you want to keep a different row or combination of rows and columns visible.
Does freezing a row stop people from editing it?
No. Freezing changes the display while scrolling; it does not prevent edits. If you need to restrict changes, configure cell or worksheet protection separately and consider whether the workbook’s sharing and permissions are appropriate.
Will a frozen row repeat when I print the worksheet?
No. Freeze Panes is for viewing the sheet on screen. To repeat a heading row on printed pages, use Page Layout > Print Titles and set the appropriate rows to repeat at the top.
Why does Freeze Top Row keep the wrong heading visible?
It freezes worksheet row 1, even if your actual table headings are lower down. Use Unfreeze Panes, select a cell directly beneath the heading rows you need, and choose Freeze Panes instead.
Related
- Freeze X and Y Panes in Excel for the Web: Step-by-Step
- How to Freeze the Top Row in Excel While Scrolling
- Freeze Rows in Excel With Keyboard Shortcuts: Step-by-Step
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Can You Merge Cells in Google Sheets? How It WorksYes, you can merge cells in Google Sheets in a web browser. Select the cells, then choose Format…
- Google Sheets Duplicate Formula: Find or Flag RepeatsTo find duplicate values in Google Sheets, use =COUNTIF($A$2:$A$100,A2)>1 in a helper column, assuming the values are in…
- Scenario Analysis in Excel: Example and Setup GuideA scenario analysis Excel example compares how a result changes when you vary key assumptions. For a simple…
- How to Delete Gridlines in Excel Without Hiding Cell BordersTo hide gridlines in Excel, open the worksheet, select the View tab, and clear the Gridlines checkbox. This…
- How to Get Rid of the Search Bar in ExcelTo hide Excel’s large Search box in Microsoft 365 for Windows, go to File > Options > General,…
- How to See Named Ranges in Excel and Check Their CellsTo see a named range in Excel, open Formulas > Name Manager to view its name and the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.