Freeze X and Y Panes in Excel for the Web: Step-by-Step

How-to basics · Updated November 20, 2026

To freeze both rows and columns in Excel for the web, 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. This is useful when a wide or long worksheet has headings or identifying details you need to see while reviewing other cells.

What You’ll Need

  • An Excel workbook opened in Excel for the web in a browser, with the worksheet you want to adjust.
  • A clear idea of which rows and columns should remain visible. For example, you might want to retain the first two heading rows and the first column of names.
  • Permission to edit the workbook if you need to change its view settings. If the workbook is read-only, ask for edit access or make an editable copy if your organization allows it.

You do not need to select a whole row or column, add a formula, or change the worksheet data. The active cell determines the freeze boundary: Excel holds the rows above it and the columns to its left in place. The row and column containing the selected cell are not included in the frozen area.

Step-by-Step

  1. Open the right worksheet. Open the workbook in Excel for the web and select the sheet tab that contains the table or data you want to work with. Freeze panes apply to the active worksheet, so check that you are on the intended sheet before making the change. If the workbook opens in viewing mode, use an available editing option or request edit access first.
  2. Decide what must stay visible. Count the rows at the top and columns on the left that you want to keep in view. To retain just the header row and the first column, you will freeze one row and one column. To retain rows 1 through 3 and columns A and B, you will freeze three rows and two columns. The frozen areas always begin at the top and left edges of the sheet; you cannot use this command to pin an arbitrary middle row while letting rows above it scroll away.
  3. Find the boundary cell. Click the cell one row below the last row you want frozen and one column to the right of the last column you want frozen. For the first row and first column, click B2. For rows 1 through 3 and columns A through B, click C4. Keep the examples straight: selecting C4 freezes rows above row 4 and columns left of column C. It does not freeze row 4 or column C.
  4. Open the Freeze Panes command. Select the View tab on the ribbon. Find Freeze Panes in the View controls and open its menu. If the ribbon is collapsed or the browser window is narrow, expand the ribbon or widen the window so the View commands are easier to locate. The exact spacing of controls can vary with the browser and window size, but the command is on the View tab.
  5. Apply the custom freeze. In the menu, choose Freeze Panes (the general command, not just Freeze Top Row or Freeze First Column). Excel uses the cell you selected to determine both boundaries. The worksheet may show a thin line marking the frozen area. If you do not see the line clearly, scroll down and across a little to confirm that the chosen headings and labels remain in place.
  6. Check the result by scrolling. Scroll down and confirm that the selected top rows stay visible. Then scroll horizontally to the right and confirm that the selected left-hand columns remain visible. If you froze both directions, test both; a sheet can be positioned so that one direction is not obvious at first. The rest of the worksheet should move normally in the unfrozen area.
  7. Correct the boundary if needed. If Excel holds the wrong number of rows or columns, open View > Freeze Panes and choose Unfreeze Panes. Select the correct boundary cell and repeat the custom freeze command. For instance, if you meant to retain columns A and B but only column A stays visible, unfreeze, select a cell in column C at the correct row, and apply Freeze Panes again.
  8. Save or confirm the workbook change. Excel for the web generally saves workbook edits automatically, but wait for any save indicator to finish before closing the browser tab. If you are collaborating, remember that a freeze-pane setting may affect how the worksheet is displayed for people using the workbook. Let collaborators know if a changed view could surprise them, and confirm the result after reopening if the view is important.

For a quick reference, selecting B2 and applying the general Freeze Panes command keeps row 1 and column A visible. Selecting C4 keeps rows 1 to 3 and columns A to B visible. If you want only the top row, use View > Freeze Panes > Freeze Top Row. If you want only the first column, use View > Freeze Panes > Freeze First Column. Those single-direction choices are convenient, but the general Freeze Panes command is the one to use when you need a custom intersection of rows and columns.

Common Mistakes

  • Selecting the wrong cell. The most frequent issue is clicking inside the row or column that should be frozen instead of just beyond it. Excel freezes everything above and to the left of the selected cell, not the selected cell itself. Before applying the command, say the boundary aloud: “freeze through row 3 and column B, so select C4.”
  • Choosing a one-direction option. Freeze Top Row preserves only the top row, while Freeze First Column preserves only column A. They do not create a custom freeze of several rows and columns together. Choose the general Freeze Panes option after selecting the appropriate boundary cell for a two-direction freeze.
  • Assuming the boundary can start anywhere. Freeze panes preserve a contiguous block starting at the top and left. They cannot keep row 10 visible while rows 1 to 9 scroll away, or hold column F while columns A to E move independently. If your layout depends on that behavior, consider reorganizing the data or using a separate summary area.
  • Applying a new setting without clearing the old one. If a previous freeze is active, it can make the result confusing. Choose Unfreeze Panes first, then set the desired boundary from a known starting point.
  • Not testing both scroll directions. A frozen row can look correct while the column boundary is wrong. Test vertical and horizontal scrolling before assuming the setup matches your intended table.

Tips

  • Use the smallest useful frozen area. Keeping many rows or columns fixed leaves less room to view the scrolling part of the worksheet, especially on a laptop. Freeze only the headings and identifiers readers need for context.
  • Keep the key labels at the top and left. Freeze panes work best when column headings are near the top and row labels are in the first columns. If labels are scattered through the sheet, a reader may still lose context while scrolling.
  • Plan the selection before clicking. Write down the last row and column to retain, then move one row down and one column right. For example, to retain rows 1 to 2 and columns A to C, select D3 before choosing Freeze Panes.
  • Distinguish freezing from filtering or hiding. Freezing changes what stays visible during scrolling; it does not lock cells against editing, protect the worksheet, or change the data. Use sheet protection or other appropriate controls if your goal is to prevent edits.
  • Consider the reader’s screen size. A freeze that works on a large monitor may occupy too much of a small browser window. Check the worksheet at a practical zoom level and with the scrollbars available to the intended audience.
  • Coordinate when sharing. If others use the same workbook, explain which headings are fixed and why. This helps collaborators understand that the worksheet is not stuck when part of it remains visible during scrolling.

Troubleshooting

The wrong rows or columns stay in place: Remove the current freeze with View > Freeze Panes > Unfreeze Panes. Click the cell below the final row and to the right of the final column you want retained, then apply the general Freeze Panes command again. Check the row and column headers against your intended boundary before scrolling.

I cannot find Freeze Panes: Make sure the workbook is open in Excel for the web and that the View tab is selected. Expand the ribbon if it is collapsed, or widen the browser window. If commands are unavailable, check whether you have edit access and whether the workbook is in a mode that allows changes. Your organization’s account settings or a particular workbook state may limit editing.

The menu option appears unavailable or the change will not apply: Confirm that a worksheet cell is selected and that you are not in the middle of editing a cell. Press Enter or Esc to finish or cancel the edit, click the intended boundary cell, and try again. If the workbook is read-only, open an editable copy only if permitted, or request access from its owner.

The freeze line is hard to see: Scroll down and to the right rather than relying only on the line. If the chosen rows and columns stay in place while the remaining cells move, the freeze is working. Also check that you did not accidentally choose Freeze Top Row or Freeze First Column when you needed a custom setting.

The worksheet feels cramped after freezing: Unfreeze the panes and choose a smaller block. For example, if rows 1 through 5 are fixed but only the first two contain headings, change the selection so only the useful heading rows remain frozen. You can also reduce the browser zoom or worksheet zoom for more room, while keeping text readable.

Frequently Asked Questions

Can I freeze rows and columns at the same time in Excel for the web?
Yes. Select the cell below the rows and to the right of the columns to keep visible, then choose View > Freeze Panes > Freeze Panes. The general command uses that cell to set both boundaries.

Which cell should I select to freeze the top row and first column?
Select B2. Applying Freeze Panes holds row 1 above the selection and column A to its left. The selected cell B2 itself is not frozen.

How do I freeze the first two rows and first three columns?
Select D3, then choose View > Freeze Panes > Freeze Panes. Rows 1 and 2 are above the selected cell, and columns A through C are to its left, so those are the areas that stay visible.

Can I freeze a middle row or a non-adjacent column?
No. Freeze Panes keeps a continuous block from the top edge and left edge of the worksheet. It cannot pin a middle row independently or preserve separated columns while the columns between them scroll.

How do I remove frozen panes?
Choose View > Freeze Panes > Unfreeze Panes. Afterward, the worksheet scrolls without the frozen row or column area. You can then select a different boundary cell and set a new freeze.

Does freezing panes protect the cells from changes?
No. It only keeps selected rows and columns visible while you scroll. It does not prevent editing, delete data, or lock the worksheet; use appropriate protection settings if you need to restrict changes.

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.