Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi all,
I have a protected sheet that only a specific user can open with password and edit it. One of the cells has a formula and i want to restrict the user from deleting the specified cell. Any suggestions? Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you are allowing the user to unlock the sheet, then I'd create a macro,
called from the worksheet_change event, that reinstates the formula if it gets altered or removed. HTH. Best wishes Harald "Lp12" skrev i melding ... Hi all, I have a protected sheet that only a specific user can open with password and edit it. One of the cells has a formula and i want to restrict the user from deleting the specified cell. Any suggestions? Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Harald,
Thanks a lot for replying. I've tried to wriet a code to do that but got messy. Might you have a sample code so i could practice? Thanks a lot. "Harald Staff" wrote: If you are allowing the user to unlock the sheet, then I'd create a macro, called from the worksheet_change event, that reinstates the formula if it gets altered or removed. HTH. Best wishes Harald "Lp12" skrev i melding ... Hi all, I have a protected sheet that only a specific user can open with password and edit it. One of the cells has a formula and i want to restrict the user from deleting the specified cell. Any suggestions? Thanks in advance |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sure. Try
Private Sub Worksheet_Change(ByVal Target As Range) Dim Cel As Range If Intersect(Target, Me.Range("B1")) Is Nothing Then Exit Sub If Me.Range("B1").FormulaR1C1 < _ "=IF(R2C1<0,R1C1/R2C1,0)" Then Application.EnableEvents = False Me.Range("B1").FormulaR1C1 = _ "=IF(R2C1<0,R1C1/R2C1,0)" Application.EnableEvents = True End If End Sub It secures the formula in B1. This goes in the worksheet module (rightclick sheet tab, "view code" to access). Note its behavior when you insert/delete rows and columns. HTH. best wishes Harald "Lp12" skrev i melding ... Hi Harald, Thanks a lot for replying. I've tried to wriet a code to do that but got messy. Might you have a sample code so i could practice? Thanks a lot. "Harald Staff" wrote: If you are allowing the user to unlock the sheet, then I'd create a macro, called from the worksheet_change event, that reinstates the formula if it gets altered or removed. HTH. Best wishes Harald "Lp12" skrev i melding ... Hi all, I have a protected sheet that only a specific user can open with password and edit it. One of the cells has a formula and i want to restrict the user from deleting the specified cell. Any suggestions? Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect formula | Excel Discussion (Misc queries) | |||
How do you protect the formula? | New Users to Excel | |||
Protect formatting & formula | Excel Discussion (Misc queries) | |||
protect formula in cell and still allow data deletion | Excel Discussion (Misc queries) | |||
how do I protect a formula in an excel speadsheet | Excel Worksheet Functions |