To keep a column’s width from being changed in Excel, set the width first, then protect the worksheet and leave the Format columns permission turned off. To keep a column visible while you scroll, use View > Freeze Panes instead. These are separate features: Freeze Panes keeps rows or columns in view, but it does not lock their widths.
What You’ll Need
- Excel for Microsoft 365 on Windows, or Excel for Mac or the web with worksheet protection available.
- A workbook you can edit. If the worksheet is already protected, you will need permission to unprotect it and, if applicable, its password.
- The column width you want to keep. Decide on it before protecting the sheet; protection can prevent later changes to column formatting.
Step-by-Step
- Decide whether you mean locked width or a column that stays visible. If your goal is to stop someone from dragging a column boundary, use worksheet protection in the steps below. If the goal is to keep a column such as ID or Customer visible as you scroll sideways, use Freeze Panes in step 6. You can use both features on the same worksheet.
- Unprotect the sheet if needed. Select the worksheet, open the Review tab, and choose Unprotect Sheet. Enter the password if Excel asks for it. If you cannot unprotect the sheet, ask its owner or the person who manages the workbook; you cannot change protected formatting permissions without the required access.
- Set the width before applying protection. Select the column letter at the top of the worksheet. To set one or more columns to an exact width, select their letter headers, then choose Home > Format > Column Width. Enter a value and select OK. You can also drag the boundary between column letters to adjust the width visually. If you want Excel to fit the contents, select the columns and choose Home > Format > AutoFit Column Width. Check the result, especially if cells contain long text or the sheet has merged cells.
- Open the worksheet protection options. Go to Review > Protect Sheet. In the Protect Sheet dialog box, you can enter a password, but a password is optional. A password helps prevent other users from removing protection, so store it safely if you use one. If you leave the password blank, users may be able to unprotect the sheet without entering one.
- Disallow column formatting. In the list of actions users may perform, make sure Format columns is not selected. This permission controls column formatting, including changing column width and hiding or unhiding columns. Review the other permissions before protecting the sheet. For example, leave Select unlocked cells enabled if you want users to enter data in cells you have unlocked. Select Protect Sheet to apply the settings.
- Check that the width is protected. Try dragging the boundary between two column headings, or select a column and try Home > Format > Column Width. Excel should prevent the change while the sheet is protected. If the change is allowed, unprotect the sheet and check that Format columns is turned off, then protect it again.
- Optionally freeze a column for scrolling. To keep the first column on screen, select View > Freeze Panes > Freeze First Column. To keep several columns visible, click the first cell immediately to the right of the columns to keep in view, then choose View > Freeze Panes > Freeze Panes. For example, to keep columns A and B visible, select a cell in column C before applying Freeze Panes. The frozen columns remain visible as you scroll horizontally; this does not prevent their widths from being changed unless you also protect the sheet.
- Save and test the workbook. Save the file, then check both behaviors you need: try scrolling to confirm the intended columns remain visible, and try to alter a width to confirm protection blocks it. If other people will use the workbook, ask them to test it with their normal editing tasks so that protection does not block actions they need.
Common Mistakes
Using Freeze Panes to lock sizing. Freeze Panes only controls which rows and columns remain in view during scrolling. It does not lock column widths, prevent AutoFit, or stop a user from dragging a column boundary. Use Protect Sheet with Format columns disabled to restrict width changes.
Protecting the sheet before setting the final widths. If you protect the worksheet first, Excel may block the formatting changes you still need to make. Unprotect it, set the widths, and reapply protection with the intended permissions.
Leaving Format columns enabled. Selecting Protect Sheet alone is not enough. If Format columns is allowed, users may still change widths, even though other parts of the sheet are protected. Reopen the protection settings after unprotecting and check that this option is cleared.
Assuming protection is a security barrier. Worksheet protection is designed to control editing, not to secure sensitive information. It does not replace file encryption or access controls. Do not rely on it to keep confidential data safe.
Expecting to lock only one column’s width with the standard checkbox. Format columns is a worksheet-level permission. Turning it off restricts column formatting across the protected sheet, not just one selected column. Plan the widths for all columns before applying protection.
Tips
Keep a note of the widths you choose, particularly if the workbook is a form or report that others maintain. A consistent width makes headings and values easier to scan. For a precise setup, select the relevant column headers and use Home > Format > Column Width rather than estimating by dragging. Excel’s width value is based on the character width of the default font, so the same number does not correspond to a universal measurement in pixels.
When users need to edit data but not redesign the sheet, unlock only the cells they should change before protecting it. Select those cells, press Ctrl+1 on Windows, open the Protection tab, clear Locked, and select OK. Then protect the sheet and allow Select unlocked cells. On Mac, use Command+1 to open Format Cells. Locked status takes effect when sheet protection is on; clearing Locked by itself does not protect or unlock the worksheet in practice.
If you also freeze panes, apply the view setting while the sheet is unprotected or after confirming Excel allows the view change under its current protection settings. Choose the cell carefully: Freeze Panes keeps all rows above and columns to the left of the selected cell in view. To remove the frozen view, choose View > Freeze Panes > Unfreeze Panes. This changes the scrolling view, not the column widths or protection permissions.
For a shared workbook, tell collaborators which cells they can edit and which formatting is restricted. A protected sheet can make ordinary tasks, such as hiding a column or adjusting its width for a longer heading, unavailable. If someone needs to change the layout, have an authorized editor unprotect the sheet, make the changes, and protect it again using the same intended permissions.
Troubleshooting
The column can still be resized. Confirm the worksheet is protected, not just the workbook structure. Go to Review and look for Unprotect Sheet; if that command is available, the sheet is currently protected. If resizing still works, unprotect the sheet, open Review > Protect Sheet, clear Format columns, and apply protection again. Also make sure you are testing the same worksheet whose settings you changed.
I cannot change a width even though I need to. Unprotect the sheet from Review > Unprotect Sheet, enter the password if requested, and change the width. Protect it again afterward. If you want collaborators to adjust widths themselves, Format columns must be allowed, which also allows broader column formatting. Excel’s standard sheet-protection controls do not provide a checkbox for allowing width changes in one column while blocking them in all others.
Freeze Panes is greyed out or freezes the wrong area. Check that you selected the correct cell before choosing Freeze Panes. Excel freezes every row above and every column to the left of the selected cell. If the wrong rows or columns are frozen, choose View > Freeze Panes > Unfreeze Panes, select the correct cell, and apply the command again. If the worksheet is protected, unprotect it if Excel will not let you change the view.
AutoFit does not give the expected result. AutoFit sizes a column to fit its contents, but merged cells can prevent a useful AutoFit result, and long text may make the column wider than you want. Set a specific width with Home > Format > Column Width, or adjust the text with Wrap Text. Once the layout is right, protect the sheet with Format columns disabled.
I forgot the sheet password. Check with the workbook owner or your organization’s administrator for the authorized password or an unprotected copy. Do not assume that workbook structure protection and worksheet protection are interchangeable: they control different things. Keep a secure record of passwords for workbooks you manage so that legitimate layout changes remain possible.
The steps look different on my device. Excel for Mac also provides worksheet protection and Freeze Panes from the Review and View tabs, though dialog layouts can differ from Windows. In Excel for the web, use Review to find sheet protection and View to find Freeze Panes; available protection options can vary by the workbook and the web interface. If a command is unavailable, open the workbook in the Excel desktop app and make the change there.
Frequently Asked Questions
Can I freeze a column’s width without protecting the worksheet?
Not with Freeze Panes. To stop users changing widths, protect the worksheet and leave Format columns disabled. Freeze Panes only keeps selected rows or columns visible while scrolling.
Does Freeze Panes stop a column from moving or resizing?
No. It affects the scrolling view, not the worksheet’s formatting permissions. Use sheet protection for width changes; freeze panes separately if you want columns to stay on screen.
Can I lock the width of just one column?
The standard Protect Sheet permission applies to column formatting across the worksheet. You can set individual widths before protection, but Excel does not offer a built-in per-column width-lock checkbox in the protection dialog.
Can users still edit cells when column widths are protected?
Yes. Before protecting the sheet, unlock the cells users should edit, then allow Select unlocked cells in the Protect Sheet options. Keep Format columns disabled to restrict width and other column formatting.
How do I remove the frozen column or change the frozen area?
Choose View > Freeze Panes > Unfreeze Panes, then select the appropriate cell and apply Freeze Panes again. This does not unprotect the worksheet or alter its column widths.
Is a password required to protect column widths?
No. You can protect a sheet without a password, but users may then be able to remove protection easily. A password helps control access to the protection settings; keep it somewhere safe.
Related
- Google Sheets Inventory Spreadsheet: Setup and Tips
- Inventory Spreadsheet: Simple Setup and Useful Tips
- Inventory List Spreadsheet Template: Build and Use One
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Close Track Changes in WordTo close Track Changes in Word, open the Review tab and select Track Changes to turn it off.…
- How to Create a New Slide Template in PowerPointTo create a reusable PowerPoint slide template, open a presentation, choose View > Slide Master, build or adjust…
- Excel Day Counter: Count Days Between DatesWith a start date in A2 and an end date in B2, enter =B2-A2 to count the days…
- How to Add a Shared Mailbox in Microsoft OutlookTo add a shared mailbox in Outlook, first ask your Microsoft 365 or Exchange administrator to grant your…
- Google Sheets Data Validation: How to Add RulesTo add data validation in Google Sheets, select the cells, choose Data > Data validation, click Add rule,…
- How to Join Two Columns in Google Sheets With a FormulaTo join two columns in Google Sheets, enter a formula such as =A2&" "&B2 in an empty column,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.