Protecting non contiguous cells
Hi
try
sub test()
For Each c In Range("A2:I10")
If c.Value < 0 Then
c.Locked = False
End If
Next
end sub
bit confused about which cells you want to protect - so let me know if the
above gives you what you want.
Cheers
JulieD
"nospaminlich" wrote in message
...
I am trying to protect all cells in a range with a value 0 so that users
can
only input into the non blank cells in the range.
I've tried this
Sub test()
Range("A2:I10").Select
If Value = 0 Then
Cells.Locked = False
End If
End Sub
but it Unlocks all cells on the Worksheet so I'm obviously doing something
very wrong.
I'd be grateful for some help please
|