How to Freeze Top Row and First Column in Excel

How-to basics · Updated November 1, 2026

To keep the top row and first column visible together while you scroll in Excel for Microsoft 365 on Windows, select cell B2, then choose View > Freeze Panes > Freeze Panes. Excel freezes the rows above and columns to the left of the selected cell, so selecting B2 keeps row 1 and column A on screen.

This is useful when a worksheet has column headings across the top and names, dates, or other identifiers down the left. Before you start, check that the headings you want to keep visible are actually in row 1 and column A. The command freezes the worksheet view; it does not change, move, or protect the underlying data.

What You’ll Need

  • An Excel workbook with the worksheet you want to work on.
  • A worksheet where the row to keep visible is row 1 and the column to keep visible is column A. If your headings are in different positions, you can select a different cell, as explained below.
  • Excel for Microsoft 365 on Windows, or Excel for Mac or the web. The main idea is the same, though the ribbon layout can vary slightly by platform.

Step-by-Step

  1. Open the right worksheet. Open the workbook and select the sheet where you want the headings to remain visible. Freeze Panes applies to the active worksheet only, not every sheet in the workbook. If you need the same view on several sheets, repeat the steps on each one.
  2. Confirm which row and column to keep on screen. In the usual layout, column headings are in row 1 and the identifying information is in column A. For example, a sales list might have product names in column A and headings such as Month and Revenue across row 1. If row 1 and column A are the desired labels, the correct selection is B2.
  3. Select cell B2. Click B2, or use the Name Box at the left end of the formula bar: click in the box, type B2, and press Enter. The selected cell matters. Excel will freeze all rows above it and all columns to its left, leaving the selected cell and the rest of the worksheet available to scroll.
  4. Open the Freeze Panes menu. On Windows, select the View tab on the ribbon. In the Window group, choose Freeze Panes. Depending on your window size, the group or control may be compacted, so look for the Freeze Panes button or its drop-down arrow. In Excel for Mac, use the View tab and open Freeze Panes. In Excel for the web, use View and then Freeze Panes; the precise placement can vary with the current ribbon layout.
  5. Choose Freeze Panes, not one of the single-area options. In the menu, choose Freeze Panes. This option uses the active-cell position, so with B2 selected it freezes both row 1 and column A. The other choices, Freeze Top Row and Freeze First Column, are convenient for freezing just one area. Choosing one of those after the other does not add a second frozen area; it replaces the existing freeze setting.
  6. Check the result by scrolling. Scroll down several rows and confirm row 1 remains visible. Then scroll to the right and confirm column A remains visible. You may see a thin line marking the boundary of the frozen area. The worksheet has not been rearranged: the line simply shows where the scrollable area begins.
  7. Adjust the selection if the wrong area is frozen. Choose View > Freeze Panes > Unfreeze Panes, then select the correct cell and apply Freeze Panes again. For instance, selecting C3 freezes rows 1 and 2 and columns A and B. To freeze only row 1 and column A, return to B2 before applying the command.

Freeze Panes is based on the selection’s position, not on which cells contain text. To freeze the first three rows and the first two columns, select C4 before choosing Freeze Panes: rows 1 through 3 are above C4, and columns A and B are to its left. This makes the selection rule useful for more complex layouts, but it also explains why the wrong active cell can produce a surprising result.

Common Mistakes

  • Using Freeze Top Row and Freeze First Column one after the other. These are separate presets, not cumulative commands. The second preset replaces the first. To keep both areas visible, unfreeze if necessary, select B2, and choose the general Freeze Panes option.
  • Selecting A2 or B1 instead of B2. Selecting A2 freezes row 1 but no columns. Selecting B1 freezes column A but no rows. Both row 1 and column A are frozen only when the selection is below row 1 and to the right of column A—in this layout, B2.
  • Assuming a heading is in row 1 when it is lower down. If the actual table headings are in row 3, selecting B2 still freezes only row 1 and column A. To keep rows 1 through 3 and column A visible, select B4 before choosing Freeze Panes.
  • Trying to freeze a selection inside a table and expecting only the table headings to stay put. Freeze Panes works from worksheet row and column positions. It does not identify table headers by their role. Select a cell below and to the right of the worksheet areas you want frozen.
  • Looking for the frozen setting on another sheet. Freeze settings belong to individual worksheets. Switching sheets may show a different scroll position or freeze arrangement; set up each sheet separately if needed.

Tips

  • Use the active cell as a boundary guide. Anything above the selected cell is frozen by row, and anything to its left is frozen by column. Imagine the frozen area as the upper-left block of the worksheet. Selecting B2 makes that block exactly row 1 by column A.
  • Try the view at realistic scroll positions. A freeze can look correct when the sheet is at the top-left corner but be less useful once you scroll far down or across. Check that the labels remain visible and do not take up so much screen space that the data area becomes cramped.
  • Keep the labels concise where practical. A very tall header row or unusually wide first column can reduce the visible working area. Freeze Panes keeps those dimensions on screen, so adjust row height or column width if the frozen labels crowd the data.
  • Remember that freezing is not protection. It does not prevent someone from editing or deleting the labels. Use worksheet protection separately if you need to control editing, and save the workbook normally to retain changes to the view.
  • Use the same boundary rule for other layouts. If you want two header rows and one identifier column to stay visible, select B3. If you want one header row and three identifier columns, select D2. The general command freezes all worksheet rows above and columns left of the active cell.

Troubleshooting

Only the top row or only the first column stays visible. The selected command was probably Freeze Top Row or Freeze First Column rather than Freeze Panes, or the active cell was in the wrong position. Choose View > Freeze Panes > Unfreeze Panes, select B2, and choose Freeze Panes. Test by scrolling both down and right.

More rows or columns are frozen than intended. Excel freezes every row above and every column to the left of the active cell. If you selected C3, for example, Excel freezes two rows and two columns. Unfreeze, select B2, and apply Freeze Panes again for just the first row and column.

The Freeze Panes option is unavailable or does not respond. Check whether the worksheet is in a view or editing state that restricts the command. Press Esc to leave cell-edit mode, and switch to View > Normal if the workbook is in Page Layout or Page Break Preview. Then try the command again. If the sheet is protected or the workbook is shared in a mode that limits changes, check the workbook’s permissions or ask its owner to allow the view change.

You cannot tell whether the panes are frozen. Look for a divider line in the worksheet and scroll away from the top or left edge. A frozen row remains at the top while lower rows move; a frozen column remains at the left while other columns move. If the behavior is still unclear, use Unfreeze Panes and set the freeze again from B2.

The view changes after closing or reopening the workbook. Save the workbook after setting the freeze. If the view still differs, confirm you reopened the same file and worksheet, rather than a copy or another sheet. Some workbooks also open with a saved active sheet and selection that differ from the one you last used, so check the sheet tabs and repeat the setup if needed.

Frequently Asked Questions

Can I freeze the top row and first column at the same time?
Yes. Select B2 and choose View > Freeze Panes > Freeze Panes. The general command freezes the row above and the column to the left of the selected cell.

Why does Freeze Top Row undo my frozen first column?
Freeze Top Row is a preset that replaces the current freeze arrangement. Use the general Freeze Panes command with B2 selected to freeze both areas together.

How do I freeze more than one row or column?
Select the cell immediately below the last row and immediately to the right of the last column you want frozen, then choose Freeze Panes. For example, select C4 to freeze rows 1–3 and columns A–B.

Can I freeze a row other than the top row?
Yes. Select a cell below the row or rows you want to keep visible. For example, selecting A4 and choosing Freeze Panes keeps rows 1 through 3 visible but does not freeze any columns.

Does Freeze Panes affect printing?
No. It changes what stays visible while you scroll on screen; it does not repeat rows or columns on printed pages. To repeat print headings, use Page Layout > Print Titles and set the rows or columns to repeat.

Does freezing the panes work the same way on Mac and the web?
The selection rule is the same: choose a cell below and to the right of the areas to keep visible, then use Freeze Panes. The View ribbon’s layout can differ slightly in Excel for Mac and Excel for the web, but use the general Freeze Panes command rather than a single-row or single-column preset.

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.