Sum Of Columns Cannot Exceed One(1)
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "A:E" '<=== change to suit
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
If Target.Count 1 Then
MsgBox "Too many cells"
Target.Cells(1, 1).Select
End If
End If
End Sub
--
HTH
Bob Phillips
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"TonyD" wrote in message
...
I have a worksheet that has a section of columns called Outcome. The
Outcome
row section cannot exceed one (1). Basically the operator can only choose
one
of five cells to enter a value not exceeding one(1). What can I use to
accomplish this? I tried using Data Validation and it only seems to work
for
one cell only.
|