Freeze X and Y Panes in Excel: Keep Headers Visible

How-to basics · Updated November 3, 2026

Freeze X and Y Panes in Excel: Keep Headers Visible

To freeze both rows and columns in Excel, select the cell immediately below the rows and to the right of the columns you want to keep visible, then choose View > Freeze Panes > Freeze Panes. For example, select B2 to keep row 1 and column A on screen while you scroll. The frozen area stays in view; the rest of the worksheet scrolls normally.

Excel does not have separate X- and Y-pane switches. The Freeze Panes command uses your active cell to freeze rows above it and columns to its left at the same time. This is useful for wide or long worksheets where you need to keep column labels, row identifiers, or both visible as you move around.

What You’ll Need

  • An Excel workbook with a worksheet you want to navigate. These steps are for Excel for Microsoft 365 on Windows.
  • A clear idea of how many top rows and left-side columns should remain visible. You can change the choice later by unfreezing and applying a new selection.
  • Access to the View tab. You do not need to edit the data or add a formula.

Step-by-Step

  1. Open the worksheet and check its layout. Click the sheet tab containing the data. Identify the rows that contain headings or other information you want to keep visible, and the columns that contain labels such as names, dates, or IDs. Freeze panes applies to the active worksheet only, so repeat the process separately on other sheets if needed. If the sheet already has frozen areas, note that you will need to remove the existing freeze before setting a different one.
  2. Choose the number of rows and columns to freeze. The selected cell is the dividing point: Excel freezes every complete row above it and every complete column to its left. To freeze the first row and first column, select B2. To freeze the first two rows and first three columns, select D3. To freeze the first four rows and first two columns, select C5. In each example, the cell itself and the worksheet area below and to its right remain scrollable.
  3. Select the dividing cell. Click the cell at the intersection just beyond the rows and columns you want fixed. You can click it in the grid or use the Name Box to navigate to an address such as D3. The Name Box is to the left of the formula bar; click it, type the cell address, and press Enter. Make sure you have selected a single cell, not an entire row or column. You do not need to select the cells that you want to freeze.
  4. Apply Freeze Panes. On the ribbon, open View > Freeze Panes > Freeze Panes. Choose the first Freeze Panes command in the menu, not Freeze Top Row or Freeze First Column. Excel creates a horizontal boundary above the selected cell and a vertical boundary to its left. Those boundaries mark the rows and columns that will stay visible as you scroll through the rest of the sheet.
  5. Test the result in both directions. Scroll down several rows and check that the frozen top rows remain in place. Then scroll horizontally to the right and check that the frozen left columns stay visible. You can use the worksheet scroll bars, a mouse wheel, or the arrow keys to move around. The cell selection does not determine which area moves after freezing; the boundary created by Freeze Panes does.
  6. Adjust the view if the frozen area is too large. A freeze setting can keep multiple rows and columns in view, but it can also leave too little room for the data you need to read. If that happens, remove the setting and choose a cell closer to the top-left corner. For example, if freezing three columns is too restrictive, unfreeze and use a cell in column C or earlier, depending on how many columns you still want fixed.
  7. Save the workbook if you want to retain the view. The pane setting is part of the workbook view and is generally retained when you save the file. Save the workbook after arranging the worksheet so the next time you open it, you can continue working with the same frozen rows and columns. If you share the file, the recipient can also change the view on their copy.

Mac and web notes: In Excel for Mac, use the View tab and choose Freeze Panes, then Freeze Panes. The selection rule is the same: the rows above and columns left of the active cell are frozen. In Excel for the web, use View > Freeze Panes and select Freeze Panes after choosing the dividing cell. Ribbon layout can vary slightly by platform or window size, but the cell-selection principle does not change.

Common Mistakes

  • Selecting the wrong cell. If you choose A2, Excel freezes the row above but no columns to the left. If you choose B1, it freezes a column but no rows above. To freeze both, the selected cell must be below at least one row and to the right of at least one column. Double-check the address before opening the menu.
  • Using Freeze Top Row or Freeze First Column. These menu choices do exactly one job: freeze the top row or the first column. They do not add the other direction to an existing freeze. Use the general Freeze Panes command on a correctly selected cell to freeze rows and columns together.
  • Choosing the header cell instead of the cell after it. To keep row 1 fixed, select a cell in row 2 or lower. To keep column A fixed, select a cell in column B or farther right. Selecting A1 freezes neither a row nor a column because there is no row above or column to its left.
  • Trying to create two separate freeze areas. Excel supports one frozen top section and one frozen left section on a worksheet, meeting at the selected boundary. It does not let you freeze unrelated rows or columns in different parts of the sheet. A hidden row or column is not a substitute for an independently frozen area.
  • Confusing Freeze Panes with Split. Split divides the worksheet window into independently scrollable sections. Freeze Panes keeps a top and/or left area stationary while the rest of the sheet scrolls. If you see multiple movable sections or divider bars that behave unexpectedly, check whether Split is active rather than assuming the freeze did not work.

Tips

  • Plan the boundary before clicking. Write down the desired count in each direction. If you want two header rows and four identifier columns fixed, the cell to select is E3: row 3 is just after the two rows, and column E is just after the four columns. This simple count avoids trial and error.
  • Keep the frozen region compact. Frozen rows and columns take up screen space even when you are viewing distant parts of the sheet. Usually, freeze only the labels you need to interpret the visible data. On a laptop display, a large frozen region may make the scrollable area awkwardly small.
  • Use Freeze Panes for navigation, not data protection. Freezing does not lock cells, prevent edits, or keep information confidential. It changes what remains visible while scrolling. Use worksheet protection or appropriate file permissions if your goal is to restrict editing or access.
  • Remember that each worksheet has its own view. Apply the setting to the sheet where it is useful. A freeze on one sheet does not automatically carry over to another sheet in the same workbook, even if both sheets have a similar layout.
  • Consider window size and zoom. If the fixed area seems to dominate the screen, reduce the number of frozen rows or columns, or adjust the zoom level. Zoom changes how much of the sheet fits on screen; it does not change which rows and columns are frozen.

Troubleshooting

  • The wrong rows or columns stay visible. Unfreeze the current setting using View > Freeze Panes > Unfreeze Panes. Then select the correct dividing cell and apply Freeze Panes again. For instance, if you want two rows and three columns fixed, select D3 before applying the command. You cannot correct the boundary simply by selecting a different cell after the freeze is in place.
  • Freeze Panes is unavailable or appears disabled. Check that you are viewing a worksheet in the normal editing view and that you have selected a cell rather than a chart, image, or other object. If the workbook or sheet is protected or opened with limited editing access, some commands may be restricted; check whether you can edit the sheet and whether protection needs to be removed by someone authorized to do so. Menu options can also differ in a browser or a narrow ribbon window.
  • Nothing seems to happen after choosing the command. Look for thin boundary lines in the worksheet, then scroll down and right to test. If the selected cell was A1, there are no rows above or columns to its left to freeze, so the result may look unchanged. Unfreeze if necessary, choose a cell such as B2, and apply the general Freeze Panes command.
  • The whole worksheet moves, including the headers. The freeze may not have been applied, may have been removed, or may have been set on a different worksheet. Confirm the correct sheet tab is active, open the View menu, and inspect the Freeze Panes options. If Unfreeze Panes is available, a freeze is active; test it by scrolling, or unfreeze and set the boundary again.
  • The sheet is divided into sections that scroll separately. Check the View tab for Split and turn it off if you do not want independent panes. Split and Freeze Panes serve different purposes and can make the display confusing when you expect a fixed header. After disabling Split, apply Freeze Panes from the intended cell.
  • You cannot see the boundary clearly. The divider is usually a subtle line, and display scaling, zoom, or a crowded sheet can make it hard to spot. Scroll a few rows down and columns across to verify what stays in place. You can also temporarily increase zoom or widen the Excel window to inspect the result, then return to your preferred display.

Frequently Asked Questions

Can I freeze rows and columns at the same time?
Yes. Select the cell below the rows and to the right of the columns you want to retain, then choose View > Freeze Panes > Freeze Panes. For example, B2 freezes the top row and first column together.

How do I freeze the first two rows and first column?
Select B3, then use View > Freeze Panes > Freeze Panes. Rows 1 and 2 are above B3, and column A is to its left, so those areas remain visible as you scroll.

Can I freeze a row that is not at the top?
Freeze Panes holds the complete rows above the selected cell, not an isolated row in the middle of the sheet. To keep a particular row visible, it must be positioned in the frozen area at the top. You may need to reorganize the worksheet if the row is currently farther down.

Why can I freeze only one set of rows and columns?
Excel provides one frozen region across the top and one down the left side, based on a single selected cell. It does not provide multiple unrelated frozen blocks on the same worksheet. Use Split if you specifically need independently scrollable sections, but that is different from keeping headers fixed.

How do I remove frozen panes?
Choose View > Freeze Panes > Unfreeze Panes. After the freeze is removed, select a new boundary cell and apply Freeze Panes again if you want a different combination of rows and columns.

Does freezing panes affect printing?
No. Freeze Panes controls the on-screen worksheet view while you scroll; it does not set repeated print titles or change page breaks. To repeat heading rows on printed pages, use the print-title settings separately under Page Layout.

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.