How to Fix All Columns in Excel (Freeze Panes Guide)
In this article
To fix all columns in Excel, you normally freeze the row of headings that sits across the top of your sheet: click the cell directly below and to the right of the columns you want to keep visible, then go to View > Freeze Panes > Freeze Panes. That locks the columns to the left of your selection (and the rows above it) so they stay on screen while you scroll. If instead you want every column to fit without horizontal scrolling, that is a separate job: select the columns and use Home > Format > AutoFit Column Width. Menu names can differ slightly by version, platform or region, but the paths below work in current Excel for Windows and Microsoft 365.
What You'll Need
- Excel for Windows or Microsoft 365 (the instructions are for those; Excel for Mac and the web app have the same commands in slightly different places)
- A worksheet with data, ideally with a header row in row 1
- Nothing else - no add-ins or macros are required for either task
Step-by-Step
The first part shows how to lock columns on screen while you scroll. The second part shows how to make every column fit the window.
Part 1: Freeze columns so they stay visible
- Open the workbook and click the sheet tab you want to fix.
- Decide which columns should stay pinned. For example, if columns A, B and C hold IDs, names and dates that you need to see while scrolling right, those three are the ones to freeze.
- Click the first cell that should not be frozen - the top-left cell of the scrolling area. If you want to freeze A, B and C, that cell is D1 (assuming your headings start in row 1). If you also want row 1 locked, click D2 instead.
- Go to the View tab on the ribbon.
- Click Freeze Panes, then choose Freeze Panes from the menu. Excel splits the sheet at your selected cell and holds everything to the left and above it in place.
- Scroll right to check that the frozen columns stay put. A thin grey line marks where the frozen area ends.
If you only need the first column locked, select Freeze First Column from the same menu. For headings only, Freeze Top Row does the same vertically. To undo any of it, go back to View > Freeze Panes and choose Unfreeze Panes.
Part 2: AutoFit all columns to their content
- Select the columns you want to resize. Click the first column letter, hold Shift and click the last one, or press Ctrl+A twice to select the whole sheet.
- Go to Home > Format in the Cells group.
- Under Cell Size, click AutoFit Column Width. Each selected column widens or narrows to fit its longest entry, and numbers shown as
####usually display properly again. - To set one exact width for several columns, use Home > Format > Column Width instead and type a value. This is useful when you want a tidy, uniform layout rather than content-sized columns.
- Quick alternative: double-click the boundary between two column letters in the header row, and that single column resizes to fit its contents.
Common Mistakes
- Selecting the wrong cell before freezing. The freeze point is the cell you click, not the columns you select. Clicking inside column C freezes only A and B, and Excel does not warn you.
- Confusing Freeze Panes with splitting. Freeze Panes holds content in place; View > Split creates four scrollable panes. They look similar but behave differently, and Split does not keep headings visible while scrolling.
- Expecting freeze to apply to the whole workbook. Freeze settings are saved per worksheet, so a new or different sheet keeps its own state. Repeat the steps on each tab.
- Freezing only the first column when you need several. Freeze First Column is a shortcut that always locks column A only, no matter which cell is active.
- AutoFitting wrapped text. If a cell has Wrap Text turned on, AutoFit can make the row very tall. Check row heights after resizing.
- Forgetting merged cells. Merged cells often refuse to AutoFit cleanly. Unmerge them if the result looks wrong.
Tips
- Freeze a header row and key columns at once by clicking the cell diagonally below and right of both areas.
- Add filters to the frozen header row with Data > Filter so you can sort without losing sight of your column names.
- If you want the frozen area printed on every page, set it separately with Page Layout > Print Titles.
- Freeze Panes can be awkward on very wide sheets; widening the window or hiding columns you do not need is often simpler than freezing many.
- When sharing a workbook, note that frozen panes do not block editing of the frozen cells - they only affect scrolling.
- Use Format > AutoFit Row Height alongside column AutoFit when you have multi-line cells.
Troubleshooting
Freeze Panes is greyed out. The sheet is probably in Page Layout view. Switch to View > Normal, then try again.
Nothing appears to freeze. You may have clicked A1, which gives Excel nothing to freeze. Click a cell further down or right and retry.
Frozen area looks wrong after deleting rows or columns. Deleting rows or columns above or to the left of the freeze point shifts it. Unfreeze, reposition the cursor and freeze again.
Columns still show #### after AutoFit. The column is too narrow for a date or a large number, or the cell holds a long formula result. Widen it manually or change the number format.
AutoFit makes columns enormous. A stray entry far to the right is stretching the width. Use Ctrl+End to find the last used cell and delete any accidental content there.
Changes do not stick after closing. Save the file, and if it is shared or read-only, check whether you have permission to modify it.
Frequently Asked Questions
Does freezing columns change the data?
No. Freezing only affects the display and scrolling. Values, formulas and formatting are untouched, and unfreezing restores the normal view.
Can I freeze more than one column?
Yes. Select the cell just below and to the right of the block you want pinned. Everything to its left and above it freezes.
Why can't I see the Freeze Panes option on Mac?
It lives on the Layout tab in Excel for Mac rather than the View tab. The commands and behaviour are the same.
Is freezing the same as locking cells?
No. Freezing is a view setting. Locking protects cells from editing and only takes effect after you protect the sheet with Review > Protect Sheet.
Will frozen panes carry over to other sheets?
No. Each worksheet stores its own freeze settings, so set them per tab.
How do I make all columns the same width?
Select the columns, then use Home > Format > Column Width and enter one value. AutoFit instead sizes each column to its own content.