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 > > 'you can change password ashish and choose your own > > > > ActiveSheet.Unprotect Password:="ashish" > If Not IsEmpty(Target.Value) Then > Target.Offset(0, -2).Locked = True > End If > ActiveSheet.Protect Password:="ashish" > Else: End If > > End Sub > > > On Wed, Jun 15, 2011 at 1:51 AM, AJ <laxplaya000...@gmail.com> wrote: > >> 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 H8. If Jack Smith is entered in J9, i >> want to lock cell H9 and so on). Any help would be greatly >> appreciated. >> >> >> Thanks, >> >> AJ >> >> -- >> >> ---------------------------------------------------------------------------------- >> Some important links for excel users: >> 1. Follow us on TWITTER for tips tricks and links : >> http://twitter.com/exceldailytip >> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >> 3. Excel tutorials at http://www.excel-macros.blogspot.com >> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >> >> To post to this group, send email to excel-macros@googlegroups.com >> >> <><><><><><><><><><><><><><><><><><><><><><> >> Like our page on facebook , Just follow below link >> http://www.facebook.com/discussexcel >> > > > > -- > *Regards* > * * > *Ashish Koul* > *akoul*.*blogspot*.com <http://akoul.blogspot.com/> > http://akoul.posterous.com/ > *akoul*.wordpress.com <http://akoul.wordpress.com/> > My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830> > > > P Before printing, think about the environment. > > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel