How to Freeze a Row in Excel: Every Method Explained (2026)
Written by the team at Iron Software
Scrolling down a large spreadsheet and watching your column headers disappear is one of those small frustrations that slows down real work. Freeze panes in Excel solve this by locking specific rows or columns in place so they stay visible no matter how far you scroll. Whether you need to freeze the top row of a dataset, lock the first column for wide tables, or hold multiple rows and columns in position at once, Excel gives you precise control over exactly what stays fixed on screen.
Freezing rows in Excel helps keep important information visible while scrolling, which is particularly useful for large datasets with many rows of data to review or filter. The header row stays visible throughout so you always know which column you are reading. The freeze panes feature is also reversible: removing a freeze is just as simple as applying one, and you can update the freeze area any time your data structure changes.
This article explains every method for working with freeze panes in Excel: how to freeze the top row, how to freeze the first column, how to freeze multiple rows or multiple columns at once, how to lock specific rows in the middle of a spreadsheet, how to use keyboard shortcuts, how to unfreeze rows and columns, and how to use split panes as an alternative. Developers building .NET applications who need to apply freeze panes programmatically to generated Excel files will find a section at the end showing how IronXL handles this in C# without requiring Microsoft Office.
Method 1: Freeze the Top Row (Quickest Method)
Best for: Any spreadsheet with a single header row that needs to stay visible while scrolling down.
To freeze the top row in Excel, go to the view tab and select Freeze Top Row, which keeps the first row visible while scrolling down through the rest of the worksheet. This is the most common use of freeze panes and requires no cell selection beforehand.
- Open your excel spreadsheet.
- Click the View tab in the ribbon.
- Click Freeze Panes in the Window group to open the drop down menu.
- Select Freeze Top Row from the list.
When the top row is frozen, a darker border appears below it, indicating that the row is locked in place while scrolling. You can also scroll down using the scroll arrow at the right side of the screen to verify the row stays fixed as expected.
Freezing the top row is particularly useful for keeping headers visible in large datasets, making data analysis easier as you scroll through the spreadsheet. For example, if your employee dataset has columns for ID, Name, Department, Salary, and Status, locking the first row means those column labels remain visible regardless of which row you are viewing.
Keyboard shortcut: To quickly freeze the top row, use the keyboard shortcut Alt + W + F + R. Press each key in sequence (not simultaneously) to trigger Freeze Top Row from the keyboard without using the ribbon.
Excel does not have a single keyboard shortcut for freezing panes, but you can use Alt + W, F to quickly access the Freeze Panes menu, then press R for Freeze Top Row, C for Freeze First Column, or F again for the general Freeze Panes option.

Method 2: Freeze the First Column
Best for: Wide spreadsheets where you need to scroll right and keep a product code, employee ID, or label column visible.
The freeze first column option works the same way as freezing the top row but locks column A in place instead.
- Click the View tab.
- Click Freeze Panes to open the drop down menu.
- Choose Freeze First Column from the options.
Excel immediately freezes column A. As you scroll right across the worksheet, the first column in Excel remains fixed on the left side of the screen while all other columns scroll normally. A darker vertical border appears to the right of the frozen column, marking the boundary between the fixed area and the scrollable area.
This is particularly useful for inventory lists, price lists, or any spreadsheet where a product code or item name in column A needs to remain visible as you review data across many columns to the right.

Method 3: Freeze Multiple Rows
Best for: Spreadsheets with multi-row headers, such as a title row followed by a column header row, or any case where you need to lock more than the first row.
To freeze multiple rows in Excel, select the cell that is immediately below the last row you want to freeze, then go to the View tab and select Freeze Panes. The key is cell selection: Excel freezes everything above the selected cell's row.
Example: Freezing the first two rows
- Click cell A3 (the first cell of the row immediately below the rows you want to freeze).
- Click the View tab.
- Click Freeze Panes in the drop down menu.
- Select Freeze Panes (not Freeze Top Row or Freeze First Column).
Rows 1 and 2 are now frozen. As you scroll down, both rows remain at the top of the screen. When freezing multiple rows and columns, the border below the last frozen row and to the right of the last frozen column appears thicker, indicating the frozen areas.
If your table's header takes up multiple rows, such as a title row followed by a separate column label row, select the row below the last header row to freeze all the header rows above it. In the sales report demo file, this means clicking A3 to freeze both the title row and the column header row together.
If the Freeze Panes option is grayed out, ensure you are in Normal view and not editing a cell. Check the View tab and confirm Normal is selected rather than Page Layout or Page Break Preview, then try again.

Method 4: Freeze Multiple Columns
Best for: Spreadsheets where you need to lock the first two or more columns, such as keeping both a product code and a product name visible while scrolling right.
To freeze multiple columns, the process mirrors freezing multiple rows: select the cell immediately to the right of the last column you want to freeze.
Example: Freezing the first two columns
- Click cell C1 (the first cell of the column C immediately to the right of the columns you want to freeze).
- Click the View tab.
- Click Freeze Panes in the drop down menu.
- Select Freeze Panes.
Columns A and B are now frozen. Scroll right and both columns remain fixed on the left. The same darker border appears to the right of the last frozen column.

Method 5: Freeze Multiple Rows and Columns Together
Best for: Large datasets where you need both a header row and an identifier column locked simultaneously.
This is where the cell selection rule becomes most important. To freeze a block of rows and columns at once, you need to select specific cells based on where you want the freeze boundary to fall.
To freeze multiple rows and columns in Excel, select the cell that is immediately below the last row and to the right of the last column you want to freeze, then go to the View tab and select Freeze Panes.
Example: Freezing the top two rows and first column
- Click cell B3. This is one row below row 2 (the last row to freeze) and one column to the right of column A (the last column to freeze).
- Click the View tab.
- Click Freeze Panes, then select Freeze Panes.
Rows 1 and 2 and column A are all frozen. Scroll right and the first column stays visible. Scroll down and both header rows remain in view.
To freeze a block of cells starting from the top row and first column, such as the top four rows and leftmost three columns, select a cell like D5 and then choose Freeze Panes from the View tab. The freeze always extends from the top-left corner of the sheet up to and including the row above and the column to the left of the selected cell.

Method 6: Freeze Specific Rows Using Cell Selection
Best for: Locking rows that are not the very first rows, such as when you want to keep a summary row or a sub-header visible.
To freeze specific rows in Excel, select the row immediately below the rows you want to freeze, then go to the View tab and click Freeze Panes.
This method works for any rows in the spreadsheet, not just the top row. For example, to lock specific rows 1 through 5 while leaving rows below row 5 to scroll freely:
- Click any cell in row 6 (the row immediately below your last desired frozen row).
- Click the View tab.
- Click Freeze Panes > Freeze Panes.
Rows 1 through 5 are now locked at the top of the screen. Note that Excel always freezes from the first row down to the row above the selected cell, so you cannot freeze a row in the middle of a dataset while leaving the rows above it scrollable. Freeze panes always anchor from the top-left corner of the worksheet.
You can add the Freeze Panes option to your Quick Access Toolbar for faster access. Right-click anywhere on the ribbon, choose Customize Quick Access Toolbar, search for Freeze Panes, and add it. This puts the option one click away without needing to open the View tab each time.

Method 7: Unfreeze Rows and Columns
Best for: Removing a freeze to reset the worksheet or change the frozen area.
To unfreeze rows or columns in Excel, go to the View tab and select Unfreeze Panes. This option appears in the Freeze Panes drop down menu only when a freeze is already applied.
- Click the View tab.
- Click Freeze Panes to open the drop down menu.
- Select Unfreeze Panes.
The Unfreeze Panes option in Excel allows users to return their worksheet to its original layout by removing any frozen rows or columns. When you select Unfreeze Panes, it will remove all frozen columns and rows, allowing you to scroll freely through your worksheet again.
An important point: if a spreadsheet already has frozen sections, you must select Unfreeze Panes before you can set a new freeze area. You cannot simply change the frozen cell selection without first removing the existing freeze.

Method 8: Use Split Panes as an Alternative
Best for: Viewing two different areas of the same worksheet simultaneously without freezing.
Split panes divide the worksheet window into two or four independent panes, each of which can scroll independently. Unlike freeze panes, split panes do not lock content in place. Instead, they create a second viewport into the same worksheet.
- Click the cell where you want to create the split.
- Click the View tab.
- Click Split in the Window group.
The worksheet divides at the selected cell. Each pane scrolls independently, so you can view row 1 and row 500 at the same time in separate panes. To remove the split, click View > Split again to toggle it off.
Split panes are useful when you need to compare two sections of a large dataset, such as viewing the beginning and end of a long list side by side. Freeze panes are the better choice when you simply need headers to stay visible while scrolling through rows and columns.
You cannot use both freeze panes and split panes on the same worksheet at the same time. Applying one will remove the other. Choose freeze panes when you want fixed headers and split panes when you want two scrollable views into the same data.

Freeze Panes with Excel Tables
An alternative to manually applying freeze panes is to convert your data range into an Excel Table. Turning your data into an Excel Table automatically keeps headers visible without needing to freeze rows manually.
- Click anywhere inside your data range, or insert a blank row above your data first if you need a title row before converting to a table.
- Press Ctrl + T to open the Create Table dialog.
- Confirm the range and whether your data has headers, then click OK.
Excel formats the range as a table and automatically keeps the column headers visible in the column letter area at the top of the screen when you scroll down through table rows, even without freeze panes applied. This works when the table is the active selection during scrolling.

Common Issues and Troubleshooting
Freeze Panes is greyed out in the View tab
The option is unavailable when the spreadsheet is in Page Layout or Page Break Preview mode. Click View > Normal to switch back to the standard view, and the freeze panes option will become available again. It is also greyed out when you are actively editing a cell. Press Escape first.
The wrong rows are frozen after applying the freeze
This happens when the selected cell is in the wrong position before applying the freeze. Remember: Excel freezes everything above and to the left of the selected cell. If row 3 froze instead of row 1, you selected a cell in row 4 rather than row 2. Unfreeze panes first, select the correct cell, and reapply.
Freeze panes are not saved when the file is shared
Freeze panes are saved as part of the worksheet settings in the Excel file. If the freeze is not persisting, check that the file is being saved in .xlsx format rather than .csv or another format that does not support these settings. CSV files do not retain freeze panes, formatting, or any view settings.
Scroll position jumps when freeze panes are applied
If the view scrolls unexpectedly when you apply a freeze, it is because Excel repositions the viewport to show the frozen area from the top of the visible window. Scroll back to the top of the sheet and reapply the freeze from there to avoid this behaviour.
Cannot change the frozen area without unfreezing first
If a spreadsheet already has frozen sections, you must select Unfreeze Panes before you can set a new freeze area. You cannot modify the freeze boundary directly. Go to View > Freeze Panes > Unfreeze Panes, then select your new cell position and reapply.
Freeze panes disappear after sharing or exporting the file
Some file conversions strip view settings. If you export to PDF, the freeze panes concept does not apply since PDF pages do not scroll. If you save as .csv, all formatting and view settings including freeze panes are lost. Save the file as .xlsx to preserve freeze panes settings. If you also need to protect the worksheet from edits after applying freeze panes, go to the Review tab and select Protect Sheet before sharing the file.
Quick Reference: Freeze Panes in Excel
| Goal | Steps | Shortcut |
|---|---|---|
| Freeze the top row | View tab > Freeze Panes > Freeze Top Row | Alt + W + F + R |
| Freeze the first column | View tab > Freeze Panes > Freeze First Column | Alt + W + F + C |
| Freeze multiple rows | Select cell in row below last frozen row > View > Freeze Panes | Alt + W + F + F |
| Freeze multiple columns | Select cell to right of last frozen column > View > Freeze Panes | Alt + W + F + F |
| Freeze rows and columns together | Select cell below and to right of freeze area > View > Freeze Panes | Alt + W + F + F |
| Unfreeze all panes | View tab > Freeze Panes > Unfreeze Panes | Alt + W + F + F |
| Add to Quick Access Toolbar | Right-click ribbon > Customize QAT > search Freeze Panes > Add | N/A |
For Developers: Add Freeze Panes Programmatically with IronXL
If your application generates Excel files for users and those files contain large datasets, adding freeze panes programmatically ensures every generated workbook arrives with headers already locked in place. IronXL is a .NET library that applies freeze panes to Excel files in C# without requiring Microsoft Office installed on the server or development machine.
IronXL's CreateFreezePane() method accepts two parameters: the column split position and the row split position, both using zero-based indexing. Column 0 equals column A, column 1 equals column B, and so on. A call of CreateFreezePane(0, 1) freezes the top row (everything above row index 1). A call of CreateFreezePane(1, 1) freezes both the top row and the first column simultaneously.
Here is a practical example that loads an existing employee dataset, freezes the top row so headers stay visible, and saves the updated file:
using IronXL;
// Load the existing Excel workbook
WorkBook workBook = WorkBook.Load("employee-dataset.xlsx");
// Access the first sheet - freeze panes apply per worksheet
WorkSheet workSheet = workBook.DefaultWorkSheet;
// Freeze the top row: colSplit=0 (no columns frozen), rowSplit=1 (freeze row 1)
// Zero-based: rowSplit=1 means freeze everything above row index 1 (i.e. freeze row 1)
workSheet.CreateFreezePane(0, 1);
workBook.SaveAs("employee-dataset-frozen.xlsx");
using IronXL;
// Load the existing Excel workbook
WorkBook workBook = WorkBook.Load("employee-dataset.xlsx");
// Access the first sheet - freeze panes apply per worksheet
WorkSheet workSheet = workBook.DefaultWorkSheet;
// Freeze the top row: colSplit=0 (no columns frozen), rowSplit=1 (freeze row 1)
// Zero-based: rowSplit=1 means freeze everything above row index 1 (i.e. freeze row 1)
workSheet.CreateFreezePane(0, 1);
workBook.SaveAs("employee-dataset-frozen.xlsx");
Imports IronXL
' Load the existing Excel workbook
Dim workBook As WorkBook = WorkBook.Load("employee-dataset.xlsx")
' Access the first sheet - freeze panes apply per worksheet
Dim workSheet As WorkSheet = workBook.DefaultWorkSheet
' Freeze the top row: colSplit=0 (no columns frozen), rowSplit=1 (freeze row 1)
' Zero-based: rowSplit=1 means freeze everything above row index 1 (i.e. freeze row 1)
workSheet.CreateFreezePane(0, 1)
workBook.SaveAs("employee-dataset-frozen.xlsx")
To freeze multiple rows, such as a title row and a header row (the first two rows), pass rowSplit=2:
using IronXL;
WorkBook workBook = WorkBook.Load("sales-report.xlsx");
WorkSheet workSheet = workBook.DefaultWorkSheet;
// Freeze the first two rows (title row + column header row)
// colSplit=0 (no columns), rowSplit=2 (freeze rows 1 and 2)
workSheet.CreateFreezePane(0, 2);
workBook.SaveAs("sales-report-frozen.xlsx");
using IronXL;
WorkBook workBook = WorkBook.Load("sales-report.xlsx");
WorkSheet workSheet = workBook.DefaultWorkSheet;
// Freeze the first two rows (title row + column header row)
// colSplit=0 (no columns), rowSplit=2 (freeze rows 1 and 2)
workSheet.CreateFreezePane(0, 2);
workBook.SaveAs("sales-report-frozen.xlsx");
Imports IronXL
Dim workBook As WorkBook = WorkBook.Load("sales-report.xlsx")
Dim workSheet As WorkSheet = workBook.DefaultWorkSheet
' Freeze the first two rows (title row + column header row)
' colSplit=0 (no columns), rowSplit=2 (freeze rows 1 and 2)
workSheet.CreateFreezePane(0, 2)
workBook.SaveAs("sales-report-frozen.xlsx")
To freeze both rows and columns together, such as the first two rows and the first column (equivalent to selecting cell B3 in Excel), pass both parameters:
using IronXL;
WorkBook workBook = WorkBook.Load("inventory-list.xlsx");
WorkSheet workSheet = workBook.DefaultWorkSheet;
// Freeze first two rows and first column
// colSplit=1 (freeze column A), rowSplit=2 (freeze rows 1 and 2)
workSheet.CreateFreezePane(1, 2);
// To remove a freeze pane, use RemovePane()
// workSheet.RemovePane();
workBook.SaveAs("inventory-list-frozen.xlsx");
using IronXL;
WorkBook workBook = WorkBook.Load("inventory-list.xlsx");
WorkSheet workSheet = workBook.DefaultWorkSheet;
// Freeze first two rows and first column
// colSplit=1 (freeze column A), rowSplit=2 (freeze rows 1 and 2)
workSheet.CreateFreezePane(1, 2);
// To remove a freeze pane, use RemovePane()
// workSheet.RemovePane();
workBook.SaveAs("inventory-list-frozen.xlsx");
Imports IronXL
Dim workBook As WorkBook = WorkBook.Load("inventory-list.xlsx")
Dim workSheet As WorkSheet = workBook.DefaultWorkSheet
' Freeze first two rows and first column
' colSplit=1 (freeze column A), rowSplit=2 (freeze rows 1 and 2)
workSheet.CreateFreezePane(1, 2)
' To remove a freeze pane, use RemovePane()
' workSheet.RemovePane()
workBook.SaveAs("inventory-list-frozen.xlsx")
IronXL's CreateFreezePane() method also accepts a four-parameter overload for advanced scenarios where you want to control the initial scroll position separately from the freeze boundary. This is useful for large datasets where you want to open the file already scrolled to a specific area while keeping the headers locked. The RemovePane() method removes all existing freeze or split panes from the worksheet in a single call.
IronXL runs on .NET 6 and later, compatible with Windows, Linux, macOS, Docker, and Azure, and is the same library used in the freeze panes how-to guide on the IronXL documentation site.
Getting started: Install via NuGet with Install-Package IronXL.Excel. A free trial is available with 30 days of full functionality and no credit card required.
Further reading:
Wrapping Up
Freeze panes are one of the most practical tools in Excel for navigating large datasets without losing context. For most spreadsheets, the fastest path is simply going to the View tab, clicking Freeze Panes, and choosing Freeze Top Row or Freeze First Column depending on whether you scroll primarily down or right. When the spreadsheet has a multi-row header, selecting the cell below the last header row and choosing Freeze Panes locks all the header rows in place in one step.
When you need to freeze multiple rows and columns together, the rule is always the same: select the cell that sits immediately below and to the right of everything you want to freeze, then click Freeze Panes. To remove any freeze, go to View > Freeze Panes > Unfreeze Panes, which clears all locked rows or columns instantly. For Excel tables, the header row stays visible automatically while scrolling without any freeze panes configuration at all.
For developers generating Excel files in .NET applications, IronXL provides the CreateFreezePane() method to apply freeze panes programmatically, ensuring every workbook your application produces arrives with headers locked and ready to use. Start with a free trial to explore the full feature set in your own environment.
Found a freeze panes scenario not covered here? Leave a comment below, or visit the Iron Software blog for more guides on Excel formatting, data management, and spreadsheet automation.




