Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock a Cell in Excell 2000

Status
Not open for further replies.

Kjonnnn

IS-IT--Management
Joined
Jul 14, 2000
Messages
1,145
Location
US
Is there a way to lock a cell that has a formula without applying protection to the whole sheet.
 
Yes, select all cells, format/protection/unlock them.

then lock the cells that you want locked.

then apply sheet protection.



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
By doing as Blue mentions, it still keeps one from using other things within the worksheet such as formatting, inserting/deleting rows/columns, and sorting, just a few to mention. If you didn't want to prevent these kinds of things, but still want to protect that one cell, then there is no real way of doing it.

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 

There is always a way of doing it!

To use a VBA solution, you could use the worksheet change event, and if the cell you don't want changed is altered it changes it right back.

Put this code in the sheet module to make the formula in b1 always equal a1*2

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$1" Then Range("b1").Formula _ = "=a1*2"
End Sub

 
Thanks guys.

I was tryn to make a sheet from my finance people to enter income and expenses on a weekly basis. They would be able to do anything on the page they wanted. But I wanted the cells that would sum the income and expense columns to lock so that they couldnt erase the formula by accident.

What work is ... if I highlight the whole sheet (excluding the formula cells), format those cells ... and uncheck the LOCK option. Then use protection for the whole page, only the formula cells are locked.

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top