By default, all cells are locked, but the locking is not in effect
until the worksheet is protected. Therefore, prior to protecting the
sheet, the cells are wide open.
If you want to lock all but a few cells, select those cells and
uncheck the Locked option on the Protection Tab of the Cell Formatting
dialog. Then protect the worksheet, supplying a password if desired.
At this point, all cells except those whose Locked property you clear
are locked. In addition to locking a cell, you can check the Hidden
property to prevent the formula of the cell from appearing in the
formula bar.
If you want to lock only a few cells and leave everything else
unlocked, you first need to unlock all the cells on the sheet. First,
select all the cells in the worksheet. You can do this by pressing
CTRL A twice or by clicking the Select All button (the square above
the "1" row header and to the left of the "A" column header -- it
isn't labeled; it appear only as a gray or blue box.). With all cells
selected, open the Cell Formatting dialog, choose the Protection tab,
and clear the Locked check box and press OK. Now, select those cells
that you do want to lock, open the formatting dialog and check the
Protect option. Finally, protect the worksheet.
To protect only formula cells and leave everything else unlocked,
select all cells as described above and then clear the Locked property
on the Protection tab of the Cell Format dialog. Then, press CTRL G to
open the Go To dialog, click the Special button, and choose the
Formals option. This will select all cells containing formulas. With
those cells selected, open the Cell Format dialog and check the Locked
property and, optionally, the Hidden property. Finally, protect the
worksheet.
If you need to change locked cells, you must first unprotect the
worksheet, supplying the correct password if a password is required.
Make your changes and then reprotect the sheet.
Remember, the Locked property of a cell has no effect unless the
worksheet is protected. If the sheet isn't protected, nothing is
locked, regardless of the Locked property.
Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com