Thread: only1
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default only1

You have to use a Worksheet_Change event sub:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then
Application.EnableEvents = False
Select Case Target.Row
Case 3
Range(Cells(4, Target.Column), Cells(5,
Target.Column)).Value = 0
Case 4
Cells(3, Target.Column).Value = 0
Cells(5, Target.Column).Value = 0
Case 5
Range(Cells(3, Target.Column), Cells(4,
Target.Column)).Value = 0

End Select
Application.EnableEvents = True
End If
End Sub


Apply Data validation on cells c3:c5 to limit the value to 1.

Regards,
Stefi

€˛kyoshirou€¯ ezt Ć*rta:

how to make user to fill in at most value of 1 inside
cell c3,c4,c5.
This means if c3 is inserted 1, c4 n c5 will auto set to 0.
Or if c4 is inserted 1, c3 n c5 will set to 0.
Or if c5 is inserted 1, c3 n c4 will set to 0.

thank