Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sum Of Columns Cannot Exceed One(1)
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sum Of Columns Cannot Exceed One(1)
You can use data validation. Say we only want a single entry in cells A1
thru E1 In cell A1 set data validation to: Settings Custom Formula is =COUNT($A$1:$E$1)<2 Then copy A1 to B1 thru E1 Excel will allow only one of the cells to be set. -- Gary's Student gsnu200705 "TonyD" wrote: 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF, but Not to Exceed | Excel Worksheet Functions | |||
How to configure Excel to exceed the limit 256 columns. | Excel Worksheet Functions | |||
Chart graph from worksheet but need to exceed 256 columns | Excel Discussion (Misc queries) | |||
Cannot Exceed | Excel Worksheet Functions | |||
Excel columns do they exceed IV? | Excel Worksheet Functions |