This tutorial demonstrates how to lock column width and/or row height in Excel.
Lock Column Width and Row Height
Before protecting the workbook, first disable locked cells. If you don’t do this, it prevents columns and rows from resizing and blocks cell content from editing.
- Select all cells in the worksheet by clicking on the small triangle in the upper-left corner of cells.
- In the Ribbon, go to the Home > Number and click on the Number Format icon in the bottom-right corner of the group.
- In the Format Cells window, go to the Protection tab, uncheck Locked, and click OK.
- Now, you can protect the worksheet. In the Ribbon, go to Review > Protect Sheet.
- Type in a password, and then check all options except Format columns and Format rows. Click OK.
Note: If you want to lock column width only, leave only Format columns unchecked. On the other hand, if you want to lock row height only, only uncheck Format rows.
- In the pop-up window, just confirm the previously entered password and click OK.
Now, you can’t resize columns or rows. If you right-click any column header (column letter), you can see that Column Width is grayed out, which means that it’s disabled. Also, you can’t hide or unhide columns.
Similarly, if you right-click any row heading (row number), Row Height is disabled.
You can’t drag columns or rows to resize them either.
Tip: Try using VBA to set column width and row height.