RE: Not allowing users to enter data into certain cells if another cel
- From: "Alok" <Alok@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 5 May 2005 13:36:04 -0700
Kimberly,
Try the following code. Paste it into the Worksheet_Change event of the
*** that you want this to work in.
If Target.Cells.Count > 1 Then Exit Sub
If Target.Cells(1).Row >= 9 _
And Target.Cells(1).Row <= 1000 _
And Target.Cells(1).Column >= 10 _
And Target.Cells(1).Column <= 33 Then
If Target.Parent.Cells(7, Target.Cells(1).Column).Value = "" Then
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
End If
End If
HTH
Alok Joshi
"KimberlyC" wrote:
> Hi,
>
> I would like to NOT allow the user to enter any data into cells
> J9:J1000 if cell J7 is empty and
> K9:K1000 if K7 is empty and
> L9:L1000 if L7 is empty and
> M9:M1000 if M7 is empty and
> N9:N1000 if N7 is empty and
> O9:O1000 if O7 is empty and
> All the way to
> AG9:AG1000 if AG7 is empty
>
> I was thinking I could do this with data valadation..but I could not get
> that to work.
>
> Maybe this can be done with VBA??
>
> Any help is greatly appreciated.
>
> Thanks,
> Kimberly
>
>
>
.
- Follow-Ups:
- Re: Not allowing users to enter data into certain cells if another cel
- From: KimberlyC
- RE: Not allowing users to enter data into certain cells if another
- From: Jim Thomlinson
- Re: Not allowing users to enter data into certain cells if another cel
- References:
- Prev by Date: Re: Class Module for setting Automatic Calc
- Next by Date: RE: Not allowing users to enter data into certain cells if another
- Previous by thread: RE: Not allowing users to enter data into certain cells if another
- Next by thread: RE: Not allowing users to enter data into certain cells if another
- Index(es):
Loading