Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Conditional formatting/functions
Hi, I'm trying to format a worksheet so that when someone enters data,
this can't be deleted or changed by the subsequent users. I still want users to be able to enter data in other cells though. Is there a way to do this with conditional formatting or functions? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Conditional formatting/functions
Only through event code which would lock each cell and protect the sheet after
entry. Of course entering into the next cell would uprotect the sheet, lock that cell and re-porotect the sheet. Carry on entering, locking, protecting, unprotecting,locking........... Private Sub Worksheet_Change(ByVal Target As Excel.Range) On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 2 Then Me.Unprotect Password:="justme" n = Target.Row If Excel.Range("B" & n).Value < "" Then Excel.Range("B" & n).Locked = True End If End If enditall: Application.EnableEvents = True Me.Protect Password:="justme", userinterfaceonly:=True End Sub Before adding the code to the sheet module, select all cells and FormatCellsProtection. Uncheck "Locked". Add the code then start entering data in column B. Gord Dibben MS Excel MVP On Sun, 4 May 2008 20:14:53 -0700 (PDT), wrote: Hi, I'm trying to format a worksheet so that when someone enters data, this can't be deleted or changed by the subsequent users. I still want users to be able to enter data in other cells though. Is there a way to do this with conditional formatting or functions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
OR Functions in a Conditional Formatting Furmula | Excel Worksheet Functions | |||
combining conditional formatting and functions | Excel Worksheet Functions | |||
cannot use ISEVEN or ISODD functions in Conditional Formatting | Excel Worksheet Functions | |||
Nested functions in conditional formatting formulae | Excel Discussion (Misc queries) | |||
Multiple FIND functions in Conditional Formatting | Excel Worksheet Functions |