See all How-To Articles

How to Lock Column Width / Row Height in Excel

This tutorial demonstrates how to lock column width and/or row height in Excel.

 

lock columns rows resizing 7

 

Lock Column Width and Row Height

Sometimes you’ll need to prevent a user from changing the height and width of cells in Excel. This can be done by protecting a workbook.

Before protecting the workbook, first disable locked cells. If you don’t do this, you will prevent columns and rows from resizing, but you will also be blocked from editing the cell content.

  1. Select all cells in the worksheet by clicking on the small triangle in the upper left corner of cells.

 

lock columns rows resizing 1

 

  1. In the Ribbon, go to the Home tab, and click on the Number Format icon in the bottom right corner of the Number group.

 

lock columns rows resizing 2

 

  1. In the Format Cells window, (1) go to the Protection tab, (2) uncheck Locked, and (3) click OK.

 

lock columns rows resizing 3

 

  1. Now, you can protect the worksheet. In the Ribbon, go to Review > Protect Sheet.

 

lock columns rows resizing 4

 

  1. Enter a password, then (2) check all options except Format columns and Format rows, and (3) click OK.

 

lock columns rows resizing 5

 

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.

  1. In the pop-up window, just confirm the previously entered password and click OK.

 

lock columns rows resizing 6

 

Now, you can’t resize columns or rows. If you right-click on any column header (column letter), you can see that the Column Width… option is grayed out, which means that it’s disabled. Also, you can’t hide or unhide columns.

 

lock columns rows resizing 7

 

Similarly, if you right-click on any row heading (row number), the Row Height… option is disabled.

 

lock columns rows resizing 8

 

You can’t drag columns or rows to resize them either.

See also: VBA Set Column Width or Row Height.

See all How-To Articles