Skip to footer content
EXCEL TOOLS

How to Freeze a Column in Excel: 8 Methods (Plus Troubleshooting)

Working in a wide Excel sheet and losing track of which row belongs to which name? Freezing a column locks it in place so it stays visible while scrolling sideways through the data. Excel calls this feature Freeze Panes, and it can lock a column, a row, or any combination of columns and rows at once to keep them visible while navigating your worksheet.

The fastest method to freeze a column takes about two seconds. Select the View tab in the ribbon, click the Freeze Panes drop-down menu, then choose the option Freeze Panes such as Freeze First Column to lock columns or rows. Column A stays anchored on the leftmost side of the screen no matter how far right the scrolling goes. A darker gray vertical line appears between column A and column B to mark the boundary as a visual confirmation of frozen panes, and that single action answers the most common version of the question.

For frozen sections that include more than one column, the same Freeze Panes option does the job with one extra step. Select the cell or column to the right of the last column to freeze, then choose View > Freeze Panes > Freeze Panes. Everything to the left of the active cell locks in place. If you want to freeze both rows and columns, select the single cell below the rows and to the right of the columns you want to lock before choosing Freeze Panes. The same menu also covers rows on their own and handles freezing rows and columns together, which gets covered further down. For teams that automate Excel files from code rather than through the ribbon, the same logic applies: a how-to guide on adding freeze panes programmatically in C# shows that the panes saved by the desktop app and the panes written by code end up stored in the file the same way.

How to Freeze a Column in Excel: 8 Methods (Plus Troubleshooting): Image 1 - View tab with the Freeze Panes drop-down expanded, showing the three options (Freeze Panes, Freeze Top Row, Freeze First Column)

Method 1: Freeze the First Column (The Quickest Option)

This is the go-to method when only the leftmost column needs to stay visible, usually a list of names, IDs, dates, or labels that the rest of the row depends on.

Steps:

  1. Open the Excel spreadsheet.
  2. Select the View tab at the top of the Excel window.

  3. In the Window group, click Freeze Panes to open the drop-down menu.

  4. Select the Freeze First Column option.

A faint vertical line is displayed to the right of column A. Scrolling right keeps the first column locked in view. No cell selection is required ahead of time. Excel always freezes column A regardless of cursor position or which cell is active.

How to Freeze a Column in Excel: 8 Methods (Plus Troubleshooting): Image 2 - A close-up of the View tab ribbon showing "Freeze First Column" highlighted

Method 2: Freeze Multiple Columns at Once

When the goal is to freeze multiple columns, such as a customer ID and a customer name together, the cell or column selection step matters.

Steps:

  1. Click the column letter of the column directly to the right of the last column to freeze. For example, to freeze the first two columns (columns A and B), select column C. To freeze the first three columns, select column D. The third column from the left becomes the boundary in that second case.

  2. Navigate to the View tab.

  3. Click Freeze Panes, then select Freeze Panes from the drop-down menu.

The first two or three columns now stay anchored as the rest of the worksheet scrolls horizontally. The faint freeze line appears to the left of the selected column.

A common mistake here is clicking inside a single cell rather than selecting the full column header. Excel uses the cell selection to determine the freeze point, and freezing happens above and to the left of the selected cell. Selecting cell C1 produces the same result as selecting column C in this case, but selecting C5 freezes the first four rows as well, which may or may not be the goal.

How to Freeze a Column in Excel: 8 Methods (Plus Troubleshooting): Image 3 - Column C selected (entire column highlighted blue) with the Freeze Panes menu

Method 3: Keyboard Shortcut for Freeze Panes

Excel does not assign a single key combo to Freeze Panes, but the ribbon shortcut sequence works fast once memorized.

Windows shortcut: Press Alt, then W, then F, then F again.

The sequence breaks down as:

  • Alt activates the ribbon shortcuts.
  • W selects the View tab.
  • F opens the Freeze Panes drop-down menu.
  • F selects Freeze Panes, the first option in the menu.

To freeze the first column instead, the sequence is Alt > W > F > C. To freeze the top row, it is Alt > W > F > R. These shortcuts work regardless of cursor position in the sheet.

Mac shortcut: Excel for Mac does not include a dedicated keyboard shortcut for Freeze Panes by default, but a custom shortcut can be assigned through Tools > Customize Keyboard in some versions. Otherwise, the View menu approach takes about the same number of clicks.

Bonus tip: Newer versions of Excel include a "Tell me what you want to do" search box at the top of the window. Type "freeze panes" into that search bar and Excel surfaces the same options without needing to navigate the ribbon at all.

How to Freeze a Column in Excel: 8 Methods (Plus Troubleshooting): Image 4 - The ribbon with key tips (the little black squares with letters) visible after pressing Alt on Windows

Method 4: Freeze Both Rows and Columns at the Same Time

This is the most powerful version of the feature, useful for spreadsheets where you need to freeze rows and columns to keep headers or key data visible during scrolling. It freezes a top row and a left column together so both stay visible during scrolling.

Steps:

  1. Select the cell that sits below the row and to the right of the column that should remain visible. For example, to freeze the first row and the first column, select cell B2. To freeze the first three rows and the first two columns, select cell C4.

  2. Navigate to the View tab.

  3. Click Freeze Panes > Freeze Panes.

Two faint lines now appear: a horizontal one below the last frozen row and a vertical one to the right of the last frozen column. Scrolling in any direction keeps the chosen rows and columns visible. This is the standard setup for dashboards, financial models, and reports where both row and column headers are the key to reading the data.

To freeze multiple rows on their own without locking any columns, click the row number directly below the last row to freeze, then choose View > Freeze Panes > Freeze Panes. Excel treats rows or columns the same way, so the same menu handles both. To freeze the top row specifically, go to the View tab, select the Freeze Panes dropdown, and choose Freeze Top Row.

How to Freeze a Column in Excel: 8 Methods (Plus Troubleshooting): Image 5 - A spreadsheet with cell B2 selected, the Freeze Panes menu and a preview of the frozen layout

Method 5: Unfreeze a Column When the Job Is Done

Frozen panes stay frozen until told otherwise, even after closing and reopening the file. To clear them:

  1. Navigate to the View tab.

  2. Click Freeze Panes.
  3. Select Unfreeze Panes from the top of the drop-down menu.

The faint freeze lines disappear and the sheet scrolls freely again. The same Unfreeze Panes option releases both frozen rows and frozen columns at once. There is no separate "unfreeze rows" or "unfreeze columns" command, because Excel stores the freeze point as a single setting per worksheet. The unfreeze option appears in the same spot where "Freeze Panes" normally sits, replacing the first menu item whenever a freeze is already active.

How to Freeze a Column in Excel: 8 Methods (Plus Troubleshooting): Image 6 - Freeze Panes drop-down showing "Unfreeze Panes" as the first option when a freeze is active

Method 6: Add a Magic Freeze Button to the Quick Access Toolbar

For spreadsheets where freezing and unfreezing happens often, adding a one-click button to the Quick Access Toolbar saves time and removes the drop-down menu trip.

Steps:

  1. Click the small drop-down arrow at the right end of the Quick Access Toolbar (the strip of icons above or below the ribbon).
  2. Select More Commands.
  3. In the Choose commands from drop-down, select All Commands.

  4. Scroll down to Freeze Panes, select it, and click Add.
  5. Click OK.

A Freeze Panes icon now appears on the Quick Access Toolbar. One click toggles the freeze on or off based on the current cell selection. This is especially helpful for accountants and analysts who switch between views many times in a single session.

How to Freeze a Column in Excel: 8 Methods (Plus Troubleshooting): Image 7 - "Excel Options" window with Freeze Panes on the left and added to the right (Quick Access Toolbar)

Method 7: Freeze Columns in Excel for the Web and Excel for Mac

The web and Mac versions of Excel handle freeze panes slightly differently from the Windows desktop app.

Excel for the Web (Microsoft 365 online):

  1. Click the View tab in the browser ribbon.

  2. Click Freeze Panes.
  3. Choose Freeze First Column, Freeze Top Row, or Freeze Panes to freeze multiple columns or multiple rows.

The online version supports the same three options as the desktop app, although a few advanced features like Quick Access Toolbar customization stay limited to the desktop release.

Excel for Mac:

  1. Click the View tab.

  2. Click Freeze Panes.
  3. Choose the appropriate option.

On older versions of Excel for Mac, the Freeze Panes button sometimes appears as a single toggle button rather than a drop-down. Clicking it freezes based on the current cell selection, mirroring the Windows behavior.

How to Freeze a Column in Excel: 8 Methods (Plus Troubleshooting): Image 8 - Side-by-side view of the Freeze Panes button in Excel for Web and Excel for Mac

Method 8: Freeze Columns with a VBA Macro

For repeating the same freeze setup across dozens of spreadsheets, a short VBA macro automates the process. This method assumes some comfort with the Developer tab, but the code itself is short.

Steps:

  1. Press Alt + F11 to open the VBA Editor.

  2. Click Insert > Module.
  3. Paste the following code:
Sub FreezeFirstColumn()
    With ActiveWindow
        .SplitColumn = 1
        .SplitRow = 0
        .FreezePanes = True
    End With
End Sub
Sub FreezeFirstColumn()
    With ActiveWindow
        .SplitColumn = 1
        .SplitRow = 0
        .FreezePanes = True
    End With
End Sub
Sub FreezeFirstColumn()
    With ActiveWindow
        .SplitColumn = 1
        .SplitRow = 0
        .FreezePanes = True
    End With
End Sub
$vbLabelText   $csharpLabel
  1. Close the editor and run the macro from View > Macros > View Macros, or assign it to a button.

Change SplitColumn = 1 to a larger number to freeze more columns. For example, SplitColumn = 3 freezes the first three columns. Setting SplitRow to a value other than zero freezes that many rows at the top as well, so SplitRow = 3 would freeze the first three rows alongside the columns.

Common Issues and Troubleshooting

Even though Freeze Panes is a simple feature, a few situations trip people up regularly.

Freeze Panes is Greyed Out

The most common cause is being in Page Layout view or Page Break Preview instead of Normal view. Switch to View > Normal and the Freeze Panes option becomes available again.

A second cause is having the sheet in Edit mode, meaning a cell is currently being edited. Press Enter or Esc to exit edit mode and try again.

A third cause: the workbook is shared, protected, or marked as final. Shared and protected workbooks have several features locked, including freeze panes in some Excel versions. Unsharing the workbook through Review > Share Workbook, or unprotecting it through Review > Unprotect Sheet, restores access.

The Wrong Columns or Rows Got Frozen

This almost always traces back to the cell that was active when Freeze Panes was clicked. Excel freezes everything above and to the left of the active cell. Select Unfreeze Panes, then select the correct cell and try again. To freeze the first row only, select cell A2 before clicking Freeze Panes. To freeze the first three rows, select cell A4. To freeze up to and including the last column on the left side of the data (for example, column F), select column G as the boundary.

Frozen Panes Disappear After Saving

Frozen panes are saved with the workbook and should persist after closing and reopening. If they disappear, check:

  • The file was saved in a format that supports freeze panes (.XLSX, .XLSM, .XLS). The .CSV format does not save view settings.
  • The view setting may differ per user if the file is opened from SharePoint or OneDrive on a different machine, since Excel sometimes stores the window state per session.

Freeze Panes and Excel Tables

Excel Tables (created via Insert > Table) include a built-in feature where the column headers replace the column letters (A, B, C) when scrolled out of view. The two features serve different purposes and work together. Freeze Panes locks the columns and rows visually for the whole sheet, while Table headers handle the scroll-aware column labels inside the table range.

The Frozen Column Looks Cut Off or Misaligned

Zoom level can cause the faint freeze line to be displayed in odd places, especially at very high or very low zoom settings. Reset to 100% via View > Zoom > 100% and the freeze line should align properly.

Split Panes vs Freeze Panes

Excel has a separate feature called Split (also found on the View tab). Split divides the window into independently scrollable panes, while Freeze locks panes in place. If a sheet looks frozen but scrolls unexpectedly, the Split feature may be active. Click View > Split to toggle it off.

When to Use Freeze Panes vs Other Options

Freeze Panes is one of three related features that solve overlapping problems:

  • Freeze Panes keeps rows and columns visible during scrolling.
  • Split creates independently scrollable views of the same sheet.
  • New Window opens a second window of the same workbook, allowing two different views side by side.

For most everyday work, Freeze Panes is the right tool. Split panes work well for comparing two distant parts of the same sheet without scrolling back and forth, and New Window helps with comparing two sheets in the same workbook at the same time.

For Developers: Freezing Columns Programmatically

For teams that generate Excel files from code rather than by hand, the same freeze pane settings can be applied through a library. IronXL is a C# library from Iron Software that reads, writes, and manipulates Excel files without requiring Microsoft Office or Excel Interop. Freezing a column with IronXL takes a single line of code:

using IronXL;
WorkBook workbook = WorkBook.Load("report.xlsx");
WorkSheet sheet = workbook.DefaultWorkSheet;
// Freeze the first column
sheet.CreateFreezePane(1, 0);
workbook.SaveAs("report-frozen.xlsx");
using IronXL;
WorkBook workbook = WorkBook.Load("report.xlsx");
WorkSheet sheet = workbook.DefaultWorkSheet;
// Freeze the first column
sheet.CreateFreezePane(1, 0);
workbook.SaveAs("report-frozen.xlsx");
Imports IronXL

Dim workbook As WorkBook = WorkBook.Load("report.xlsx")
Dim sheet As WorkSheet = workbook.DefaultWorkSheet
' Freeze the first column
sheet.CreateFreezePane(1, 0)
workbook.SaveAs("report-frozen.xlsx")
$vbLabelText   $csharpLabel

The first argument is the number of columns to freeze from the left, and the second is the number of rows to freeze from the top. Passing (2, 1) would freeze the first two columns and the top row together. Full code samples for the two-parameter and four-parameter versions of the method can be found out in the C# Freeze Panes code example guide.

Wrapping Up

Freezing a column in Excel takes a single click for the most common case and a single menu trip for almost every other case. The View tab handles all of it: Freeze First Column to freeze the first column, Freeze Panes to freeze multiple columns or multiple rows, Freeze Top Row for the top row, and Unfreeze Panes to clear the setting. Keyboard shortcuts, the Quick Access Toolbar, and VBA macros offer faster alternatives for power users, and the troubleshooting steps above cover the handful of cases where the option appears greyed out or behaves unexpectedly.

This guide was written by the creators of IronXL and other .NET libraries that handle Excel files programmatically. Teams that need to freeze panes, format cells, or generate spreadsheets from code can follow the step-by-step tutorial for creating Excel files in C# without Office for a full walkthrough of these operations.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More

Iron Support Team

We're online 24 hours, 5 days a week.
Chat
Email
Call Me