How to Freeze Rows and Columns in Excel

Working with large datasets in Microsoft Excel can quickly become frustrating. When you scroll down or across hundreds of rows and columns, the crucial header labels disappear off the edge of the screen, leaving you guessing what data belongs to which category.

To solve this, Excel includes a feature called “Freeze Panes.” This tool allows you to lock specific rows (usually headers) or columns in place so they remain visible no matter how far you scroll through your spreadsheet.

How to Freeze the Top Row

If your dataset only has a single row of headers at the very top (Row 1), freezing it is incredibly straightforward.

  1. Open your Excel spreadsheet.
  2. Click on the View tab located on the top ribbon.
  3. In the Window group, click the Freeze Panes button.
  4. From the drop-down menu, select Freeze Top Row.

A subtle, solid grey line will appear directly beneath Row 1. As you scroll down the sheet, Row 1 will now remain permanently locked at the top of your screen.

How to Freeze the First Column

Similarly, if you need to keep the first column (Column A) visible—such as a list of names or ID numbers—while scrolling horizontally through months of data, you can lock it.

  1. Navigate to the View tab on the ribbon.
  2. Click Freeze Panes.
  3. Select Freeze First Column.

The solid line will appear to the right of Column A, locking it in place during horizontal scrolling.

How to Freeze Multiple Rows and Columns Simultaneously

Often, a spreadsheet will have a complex layout requiring both the top two rows and the first column to be frozen at the same time. This requires a slightly different approach using cell selection.

The key rule to remember is this: Excel will freeze all rows above your selected cell, and all columns to the left of your selected cell.

  1. Determine exactly which rows and columns you want to lock. For example, if you want to lock Rows 1 and 2, and Column A.
  2. Click to select the single cell that is directly underneath the rows you want to freeze, and directly to the right of the columns you want to freeze. In this example, you would click Cell B3.
  3. Go to the View tab.
  4. Click Freeze Panes.
  5. Select the first option, simply named Freeze Panes.

You will now see intersecting lines locking both your top headers and your side labels into position simultaneously.

How to Unfreeze Rows and Columns

If you no longer need the panes locked, or if you made a mistake during selection, you can remove the freeze entirely.

  1. Go to the View tab.
  2. Click Freeze Panes.
  3. Select Unfreeze Panes (this option replaces the standard Freeze Panes button when a freeze is currently active).

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.