How to Freeze the Top Row and First Column in Excel?

We often work with very large datasets in Excel.

One issue many users face is that when you scroll too far down or too far to the right, the first row or the first column disappears from view. 

This may cause you to lose track of the column heading to which the data entry belongs and may require you to scroll back and forth to see the column heading. 

This is very inconvenient.

Fortunately, Excel has an excellent feature called Freeze Panes, which allows you to freeze rows or columns or both so that as you scroll through the worksheet, the row or column always remains in view.

In this tutorial, I will show you different methods on how to freeze either the top row or first column or both the top row and first column.

How to Freeze the Top Row Only

In this method, we will look at the steps needed for freezing the top row. 

As an example, we will freeze the top row of the following dataset, which spans over multiple columns and rows.

dataset where the top row needs to be freezed
  1. Go to the View tab.
click the view tab
  1. Under the View tab, select the Freeze Panes option.
click on freeze panes
  1. The Freeze Panes drop-down panel will appear as shown.
freeze panes drop down
  1. From this panel, select the Freeze Top Row option.
click on the freeze top row option
  1. Scroll down, and you will see that the top row is now frozen.
top row is now locked

As you scroll down, the top row will remain in place and in view.

Pro Tip: You can also use the keyboard shortcut ALT + W + F + R. To use this, select any cell in the worksheet and then press these keys one after the other

So in this method, we have seen how to freeze the Top Row using the Freeze Panes option.

How to Freeze the First Column Only

In this method, we will look at the steps needed for freezing the first column.

As an example, we will take a look at freezing the first column of the following dataset, which we have used in the previous method as well.

  1. Go to the View tab.
click the view tab
  1. Under the View tab, select the Freeze Panes option.
click on freeze panes
  1. The Freeze Panes drop-down panel will appear as shown.
freeze panes options
  1. From this panel, select the Freeze First Column option.
select the freeze first column option
  1. Scroll to the right, and you will see that the first column is now frozen.
first column is now locked

As you scroll to the right, the first column will remain in place and in view. So in this method, we have seen how to freeze the first column using the Freeze Panes option.

Pro Tip: You can also use the keyboard shortcut ALT + W + F + C to freeze the first column. To use this, select any cell in the worksheet and then press these keys one after the other

How to Freeze the Top Row and First Column

In this method, we will look at the steps needed for freezing both the top row and the first column. 

As an example, we will freeze the first row and first column of the following dataset which we have used in the previous method as well.

The way the Freeze Panes option works is, both columns and rows will freeze based on the location of the selected cell in the worksheet. 

All columns to the left of the selected cell and all rows above the selected cell will become frozen. 

This does not include the selected cell’s row and column. So if we want to freeze the first row, the selected cell needs to be in the second row. 

If we want to freeze the first column, the selected cell needs to be in the second column.

In our case, for freezing the first row and first column simultaneously, the selected cell needs to be in the second row and second column. This will be cell B2.

  1. Select cell B2.
select the cell
  1. Go to the View tab.
  2. Under the View tab, select the Freeze Panes option.
click the freeze panes option
  1. The Freeze Panes drop-down panel will appear as shown.
freeze panes options appear
  1. From this panel, select the Freeze Panes option.
select the freeze panes option

The first row and the first column are now freezed.

If you scroll down or scroll to the right, you will see that both the first row and first column are always visible.

top row and first column are now locked

Pro Tip: You can also use the keyboard shortcut ALT + W + F + F to freeze the rows above the selected cells and columns to the left of the selected cell. To use this, select the cell in the worksheet and then press these keys one after the other

So in this method, we have seen how to freeze both the first row and the first column using the Freeze Panes option.

How to Freeze Multiple Rows and Mulitple Columns

In this method, we will see how to freeze multiple rows and columns using the Freeze Panes option. 

As an example, we will freeze the first two rows and the first two columns from the following dataset that we have been using previously.

As explained in the previous method, the Freeze Panes option will freeze both rows and columns based on the location of the selected cell in the worksheet.

Because we want to freeze the first two rows and first two columns, our selected cell needs to be in the third and third row.

This is cell C3.

  1. Select cell C3.
  1. Go to the View tab.
  2. Under the View tab, select the Freeze Panes option.
click on the freeze panes option
  1. The Freeze Panes drop-down panel will appear as shown.
freeze panes options appear
  1. From this panel, select the Freeze Panes option.
select the freeze panes option

The above steps would freeze the first two rows and the left-most column.

As you scroll down or scroll to the right, you will see that the first two rows and first two columns are always visible.

multiple rows and multiple columns are now locked

Pro Tip: You can also use the keyboard shortcut ALT + W + F + F to freeze the rows above the selected cells and columns to the left of the selected cell. To use this, select the cell in the worksheet and then press these keys one after the other

How to Unfreeze Rows and Columns in Excel

Freeze panes options work as a toggle, so when you use it once, it is going to freeze the rows/columns, and when you use it again, it is going to unfreeze them.

Below are the steps to unfreeze rows and columns in Excel:

  1. Click the View tab
  2. Click on the Freeze Panes option
  3. From the drop-down options that appears, click on the Freeze Panes option

No matter what rows or columns you have frozen in your worksheet, the above steps will instantly unfreeze everything.

Note: Freeze Panes is a worksheet-level option, which means that it will only be applied to the active worksheet and will not impact the other worksheets in the workbook

In conclusion, we have seen four different methods to freeze rows and columns in Excel.

Method 1 freezes only the top row, and Method 2 freezes only the first column. 

If you want to freeze both the top row and the first column simultaneously, use Method 3. Furthermore, if you want to freeze multiple rows and columns, use Method 4.

And finally, I’ve also covered how you can quickly unfreeze rows and columns in Excel.

I hope you found this Excel tutorial useful.

Other Excel articles you may also like: