Freeze a Line in Excel While Scrolling Rows and Columns

How-to basics · Updated November 20, 2026

To keep a row or column visible while you scroll in Excel for Microsoft 365 on Windows, open View > Freeze Panes and choose Freeze Top Row, Freeze First Column, or select a cell and choose Freeze Panes. This keeps headings or identifiers on screen so you can compare them with data farther down or across the worksheet. Save or open the workbook and identify which rows or columns should stay visible before you begin.

What You’ll Need

  • A worksheet open in desktop Excel for Microsoft 365. The instructions also note where Excel for Mac and Excel for the web differ.
  • A clear idea of the boundary: for example, the first row, the first two rows, or the top two rows and first column.
  • If you want a custom arrangement, know the cell just below the rows and just to the right of the columns you want to keep visible.

Step-by-Step

  1. Open the worksheet and check its layout. Click the sheet tab that contains the data. Look at the row and column headings and decide what must remain visible as you move through the sheet. A heading row usually contains labels such as Date, Item, or Total. A left-hand identifier column might contain names, product codes, or locations. Excel freezes rows from the top and columns from the left; it does not pin an arbitrary row in the middle of a worksheet while leaving rows above it scrolling freely.
  2. Remove any existing freeze before setting a different one. Go to View > Freeze Panes > Unfreeze Panes if that command is available. Excel applies one freeze arrangement at a time to the active worksheet window, so an old setting can prevent a new selection from behaving as expected. If the menu offers Freeze Panes rather than Unfreeze Panes, there may not be a current freeze to remove. Unfreezing does not delete or rearrange worksheet data; it only restores ordinary scrolling.
  3. Freeze just the top row when it contains your headings. Choose View > Freeze Panes > Freeze Top Row. Excel keeps row 1 visible while you scroll down. You can test it by scrolling several rows below the top. This preset is useful when the labels are in the first row, but it is not the right choice when a title or blank row appears above the actual column headings. For headings in row 3, use a custom freeze instead so rows 1 through 3 remain visible.
  4. Freeze just the first column when it contains identifiers. Choose View > Freeze Panes > Freeze First Column. Column A stays visible as you scroll horizontally to columns farther to the right. This is handy when each row is identified by a name or item number in column A. The preset freezes only the first column; if you need columns A and B, use the custom selection method in the next step.
  5. Use Freeze Panes for a custom number of rows or columns. First click the cell immediately below the rows you want to keep and immediately to the right of the columns you want to keep. Then choose View > Freeze Panes > Freeze Panes—the first Freeze Panes is the menu command, not one of the two presets. For example, select A3 to freeze rows 1 and 2 while leaving all columns free to scroll. Select C4 to keep rows 1 through 3 and columns A and B visible. Excel freezes everything above and to the left of the selected cell.
  6. Check the boundary before you select. The active cell itself does not become a frozen row or column; it marks the dividing line. If you want to freeze the top two rows only, choose a cell in row 3 and column A, such as A3. If you want the top row and the first two columns, choose C2. Selecting B2 freezes only row 1 and column A. These examples are useful checks because choosing a cell one row or column too early changes what stays on screen.
  7. Scroll to confirm the result. Scroll down to check frozen rows, then scroll horizontally to check frozen columns. A heavier line on the worksheet marks the frozen boundary. You can still move through and edit the rest of the sheet normally; freezing panes changes the view, not the contents, sort order, or permissions. If the boundary is in the wrong place, unfreeze and repeat the selection rather than dragging cells or changing the worksheet layout.
  8. Use the equivalent controls on Mac or the web when needed. In Excel for Mac, use the View tab and its Freeze Panes menu; the same top-row, first-column, and custom-cell logic applies, though the ribbon layout and keyboard navigation can differ. In Excel for the web, open View > Freeze Panes and choose an available freeze option. The exact menu presentation can vary with the web interface, but the custom selection rule remains: select the cell below and to the right of the area to keep visible.

Common Mistakes

Choosing the wrong cell for a custom freeze: Excel freezes rows above and columns to the left of the selected cell. Selecting B3 keeps rows 1 and 2 and column A; it does not freeze row 3 or column B. Work out the boundary first, then click the cell just beyond it.

Using a preset when the headings are not in the first row: Freeze Top Row always targets row 1. If your headings are in row 4, select a cell in row 5 instead, such as A5, and use the custom command to keep rows 1 through 4 visible.

Expecting Freeze Panes to pin any selected line: The command works from the top and left edges. It cannot keep row 20 fixed while rows 1 through 19 scroll out of view. If a particular record must remain visible, consider copying it to a summary area or using a filter or another layout, rather than expecting a freeze setting to pin it.

Confusing freezing with splitting or printing: Freeze Panes is for on-screen scrolling. Split creates independently scrollable worksheet sections, which is a different view. Freeze Panes also does not repeat headings on printed pages; use Page Layout > Print Titles to set print rows or columns.

Tips

Use the smallest frozen area that gives you enough context. Keeping a single heading row and one identifier column visible often leaves more screen space for the data. If you freeze many rows and columns, the scrolling area can become cramped, especially on a small display.

When deciding on a custom boundary, count worksheet rows and columns rather than relying on what is currently visible. For example, a blank row above the headings still counts as a row. If the headings are in row 2 and you want both the blank row and headings to stay put, select a cell in row 3.

Consider widening or shortening heading labels before freezing. A frozen column that is too wide reduces the room available for other columns, while wrapped text in a frozen row can make the visible area tall. You can adjust column width or row height without changing the freeze boundary.

For large tables, freeze panes can work alongside filters and tables: freezing controls what remains on screen, while filters control which records are displayed. Neither feature replaces the other. Keep a copy of the workbook if you are unsure about its current view settings, particularly when several people share the file.

Troubleshooting

The wrong rows or columns stay visible: Choose View > Freeze Panes > Unfreeze Panes, then select the correct cell and apply the custom command again. Remember that a selection at C4 freezes rows 1–3 and columns A–B. If your intended boundary is different, adjust the selection accordingly.

The freeze command is unavailable or does not seem to work: Check that you are in a worksheet view where the command is enabled and that the workbook is not in a restricted or unusual editing state. If the workbook is shared or protected, try making a permitted copy or ask the workbook owner about access. Also check whether panes are already frozen; unfreeze them and retry. Menu placement can differ between desktop and web versions.

You can scroll in one direction but not see the expected frozen area: Test vertical and horizontal scrolling separately. A horizontal scroll is needed to confirm frozen columns, while a vertical scroll checks frozen rows. If you selected A3, for example, rows 1 and 2 remain fixed but no columns are frozen, so there will be no fixed left-hand column when scrolling sideways.

The visible area is too small or the dividing line looks confusing: Unfreeze panes and set a smaller frozen region. The thick boundary indicates where fixed and scrolling sections meet; it is not a cell border or a locked range. If merged cells cross the intended boundary, adjust the layout or unmerge them before setting the freeze, since merged layouts can make the pane division difficult to interpret.

The headings disappear when printing: That is expected: freezing affects the worksheet view, not printed page layout. Open Page Layout > Print Titles and specify the rows or columns to repeat on each printed page. Preview the printout separately, because a correct freeze setting does not guarantee the print titles are configured.

Frequently Asked Questions

Can I freeze more than one row in Excel?
Yes. Select a cell in the row immediately below the last row to keep visible, then use View > Freeze Panes > Freeze Panes. Selecting A4 keeps rows 1 through 3 visible.

Can I freeze a row and a column at the same time?
Yes. Select the cell below the rows and to the right of the columns you want to keep. Selecting B2 freezes row 1 and column A; selecting C4 freezes rows 1–3 and columns A–B.

Can I freeze a row that is not at the top?
Not by itself. Freeze Panes keeps rows starting at row 1 in place, so freezing row 5 also keeps rows 1–4 visible. It does not pin a middle row independently.

Does freezing a line stop people from editing it?
No. Frozen rows and columns remain editable. To control editing, use worksheet protection and permitted-cell settings; freeze panes only affects scrolling and visibility.

How do I remove a freeze?
Choose View > Freeze Panes > Unfreeze Panes. The worksheet returns to normal scrolling, and your cell values and formatting remain unchanged.

Does Freeze Top Row repeat headings on every printed page?
No. Use Page Layout > Print Titles to repeat heading rows on printed pages. Freeze Panes is intended to keep them visible while navigating the worksheet on screen.

Related

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.