How to Freeze Rows and Columns in Excel (Step by Step)
By Dr. Zubair Khalid, DVM, MS, PhD ·

If you want to know how to freeze a row in Excel, the answer is one command: select the cell below the rows you want to keep visible, then go to View > Freeze Panes > Freeze Panes [1]. Excel locks everything above and to the left of your selected cell, so those headers stay on screen while the rest of the sheet scrolls [1]. The same menu handles columns, multiple rows, and unfreezing.
Quick Answer
- To freeze the top row only, select cell A2, then choose View > Freeze Panes > Freeze Panes [1].
- To freeze the first column only, select cell B1, then choose View > Freeze Panes > Freeze Panes [1].
- To freeze both the top row and first column, select cell B2 [2].
- Freeze Panes always locks the rows above and the columns left of the selected cell, so you pick the cell below and to the right of the area you want to keep visible [1].
- To undo it, go to View > Freeze Panes > Unfreeze Panes [1].
Before You Start
Freeze Panes lives on the View tab. If you do not see the View tab, you may be using Excel Starter, which does not support every feature [1]. On Excel for Mac, if the Freeze button appears grayed out, select Normal on the View tab first [2].
One idea trips people up more than any other. Freeze Panes does not lock the row you select. It locks everything above and to the left of the cell you select [1]. So if you want row 1 to stay visible, you select a cell in row 2. If you want rows 1 through 4 to stay visible, you select a cell in row 5.
Freezing is a view setting, not a data change. It does not protect cells from editing. If your goal is to stop people from changing values, that is a different feature, covered in How to Lock Cells in Excel.
Step by Step
- Open the worksheet that has the headers you want to keep visible.
- Decide what should stay on screen. A single header row, a header row plus the first column, or several rows at the top.
- Select the cell below the rows and to the right of the columns you want to keep visible [1]. For the top row only, that is A2. For the first column only, that is B1. For both, that is B2 [2].
- Go to the View tab on the ribbon.
- Select Freeze Panes, then select Freeze Panes again in the dropdown [1].
- Scroll down or across and confirm the frozen area stays in place. A slightly darker border appears below the last frozen row and to the right of the last frozen column [2].
- To remove it later, go to View > Freeze Panes > Unfreeze Panes [1].
If you freeze the wrong area, unfreeze first, then select the correct cell and freeze again. While panes are frozen, the first option in the Freeze Panes menu reads Unfreeze Panes, so you cannot set a new freeze point until you unfreeze.
Worked Example
Here is a small grade sheet with ten students. Column A holds names, column B holds scores, and column C uses a formula to decide Pass or Fail.
| A | B | C | |
|---|---|---|---|
| 1 | Student | Score | Result |
| 2 | Ana | 78 | =IF(B2>=70,"Pass","Fail") -> displays Pass |
| 3 | Ben | 65 | =IF(B3>=70,"Pass","Fail") -> displays Fail |
| 4 | Cara | 91 | =IF(B4>=70,"Pass","Fail") -> displays Pass |
| 5 | Dan | 54 | =IF(B5>=70,"Pass","Fail") -> displays Fail |
| 6 | Eve | 88 | =IF(B6>=70,"Pass","Fail") -> displays Pass |
| 7 | Finn | 72 | =IF(B7>=70,"Pass","Fail") -> displays Pass |
| 8 | Gus | 69 | =IF(B8>=70,"Pass","Fail") -> displays Fail |
| 9 | Hana | 95 | =IF(B9>=70,"Pass","Fail") -> displays Pass |
| 10 | Ivy | 61 | =IF(B10>=70,"Pass","Fail") -> displays Fail |
| 11 | Jon | 83 | =IF(B11>=70,"Pass","Fail") -> displays Pass |
Each formula in column C checks whether the score in the same row is at least 70. The pattern is:
$$=IF(B2>=70,"Pass","Fail")$$
Ana scores 78, so C2 displays Pass. Ben scores 65, so C3 displays Fail. Cara scores 91, so C4 displays Pass. Dan scores 54, so C5 displays Fail. Eve scores 88, so C6 displays Pass. Finn scores 72, so C7 displays Pass. Gus scores 69, so C8 displays Fail. Hana scores 95, so C9 displays Pass. Ivy scores 61, so C10 displays Fail. Jon scores 83, so C11 displays Pass.
Now freeze the header row so you can scroll through all ten students without losing the column labels.
- Select cell A2 to keep the header row visible while scrolling.
- Go to View > Freeze Panes > Freeze Panes.
- Scroll down and confirm row 1 (Student, Score, Result) stays visible at the top.
After freezing the top row, the Student, Score, and Result headers remain on screen while the ten student rows scroll. That is the whole point of the feature. When you reach row 11 and see Jon's Pass, you still know which column is the score and which is the result.
Other Ways to Do It
Excel for Mac follows the same logic. Select the cell below and to the right of the area you want frozen, then use the Freeze button on the View tab [2]. To freeze the top row and first column together on a Mac, select cell B2 [2].
On an iPad, tap View > Freeze Panes, then tap the option you need. To freeze multiple columns starting with column A, select the column to the right of the last column you want frozen, then tap View > Freeze Panes > Freeze Panes [3]. On an iPhone, tap the ellipses button to bring up the ribbon, tap Home > View, scroll down, and tap Freeze Panes [3].
If you want two independent scrolling areas instead of a locked header, use Split instead of Freeze Panes. Select the cell below and to the right of where you want the split, then choose View > Window > Split. Selecting row 13 splits the worksheet below row 12, and selecting the Split button again removes the split [4]. Splitting is useful when you want to compare two distant parts of the same sheet, such as a name in row 180 against the top ten finishers [4].
Troubleshooting
The Freeze Panes option is grayed out. You may be in cell edit mode. Press Enter or Esc to leave the cell, then try again. On Mac, if the Freeze button is grayed out, select Normal on the View tab [2].
I froze the wrong rows. Unfreeze first with View > Freeze Panes > Unfreeze Panes, then select the correct cell and freeze again [1].
The frozen line disappeared. Check whether the sheet is in Page Layout view. Freeze settings apply to Normal view.
I only see part of my frozen area. Freeze Panes locks rows above and columns left of the selected cell. If you selected C3, rows 1 and 2 plus columns A and B are frozen [1]. Select a different cell if that is not what you wanted.
My frozen row is hidden. If row 1 is hidden, the frozen area may look empty. Unhide the row first, then reapply the freeze. See How to Unhide Rows in Excel for the steps.
Common Mistakes
- Selecting the header row instead of the row below it. Freeze Panes locks rows above the selection, so selecting row 1 freezes nothing useful. Fix: select A2 to freeze row 1 [1].
- Expecting freeze to protect data. Freezing only changes what stays visible. Fix: use sheet protection if you need to prevent edits.
- Freezing too many rows. A large frozen area eats screen space on small laptops. Fix: freeze only the header rows you actually reference.
- Forgetting that columns freeze too. Selecting C3 freezes columns A and B as well as rows 1 and 2 [1]. Fix: pick the cell that matches exactly what you want locked.
- Trying to freeze a middle block. You cannot freeze rows 5 through 8 while letting rows 1 through 4 scroll. Fix: move the header to the top, or use Split for two independent panes [4].
- Trying to move the freeze point without unfreezing. While panes are frozen, the first menu option reads Unfreeze Panes, so you cannot pick a new freeze cell directly. Fix: unfreeze, then select the correct cell [1].
Limitations
Freeze Panes is a view setting tied to the worksheet, not the workbook or the file. It does not travel with copied cells, and it does not appear in printed output. If you print a long sheet, use print titles instead, which is a separate setting.
Freezing also cannot lock a block in the middle of a sheet. The frozen area always starts at the top row and the first column [2]. If your headers sit in row 5 with data above them, freezing will not give you the result you want. You would need to restructure the sheet or use Split panes [4]. And if you share the file, other people see the frozen panes too, which may not suit every reader. To remove them for everyone, unfreeze before sharing, as covered in How to Unfreeze Panes in Excel.
Frequently Asked Questions
How do I freeze cells in Excel?
You freeze cells by selecting the cell below and to the right of the area you want to keep visible, then choosing View > Freeze Panes > Freeze Panes [1]. Excel locks the rows above and columns left of that cell. There is no way to freeze a single cell in the middle of a sheet on its own.
How do you freeze rows in Excel without freezing columns?
Select a cell in column A, in the row just below the last row you want frozen. For example, select A2 to freeze only row 1, or A5 to freeze rows 1 through 4. Because the selection is in column A, no columns are locked [1].
How do I freeze the top row and first column at the same time?
Select cell B2, then choose View > Freeze Panes > Freeze Panes [2]. Row 1 and column A both stay visible while you scroll. The darker border appears below row 1 and to the right of column A [2].
How do I lock rows in Excel so they stay visible?
Locking rows for visibility is the same as freezing them. Select the cell below the rows you want to keep on screen and use Freeze Panes [1]. If you meant locking rows so they cannot be edited, that is sheet protection, not freeze panes.
Can I freeze more than one row?
Yes. Select the row below the last row you want frozen. To freeze the top four rows, select a cell in row 5, then choose View > Freeze Panes > Freeze Panes [2]. You can freeze as many rows or columns as you want, as long as the frozen area starts at the top row and first column [2].
References
- Freeze panes to lock rows and columns | Microsoft Support
- Freeze panes to lock the first row or column in Excel for Mac | Microsoft Support
- Freeze panes to lock the first row or column in Excel for iOS | Microsoft Support
- Split panes to lock rows or columns in separate worksheet areas | Microsoft Support
Further Reading
- Broman KW, Woo KH (2018). Data Organization in Spreadsheets. The American Statistician
- Ziemann M, Eren Y, El-Osta A (2016). Gene name errors are widespread in the scientific literature. Genome Biology