Re: $$Excel-Macros$$ Protecting certain cells based on conditions

2011-06-15 Thread AJ Angelosante
Thank you very much for your help, it worked perfectly!!! On Tue, Jun 14, 2011 at 9:49 PM, ashish koul koul.ash...@gmail.com wrote: try this Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 10 And Target.Row = 8 Then 'target.column =3 because column c is no 3 column

$$Excel-Macros$$ Protecting certain cells based on conditions

2011-06-14 Thread AJ
I have a worksheet with dollar values in column H, beginning in cell H8 and names in column J, beginning in cell J8. I want to use a formula or vba code to lock a cell in column H based on if there is data entered in a cell in column J. For ex. (if John Smilth is entered in J8, I want to lock

Re: $$Excel-Macros$$ Protecting certain cells based on conditions

2011-06-14 Thread ashish koul
try this Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 10 And Target.Row = 8 Then 'target.column =3 because column c is no 3 column 'you can change password ashish and choose your own ActiveSheet.Unprotect Password:=ashish If Not IsEmpty(Target.Value) Then