Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF, but Not to Exceed dnamertz Excel Worksheet Functions 4 January 24th 09 09:34 PM
How to configure Excel to exceed the limit 256 columns. hp2411 Excel Worksheet Functions 4 March 15th 08 02:57 AM
Chart graph from worksheet but need to exceed 256 columns sammymcd Excel Discussion (Misc queries) 2 February 7th 08 06:44 PM
Cannot Exceed Greg Excel Worksheet Functions 8 October 27th 07 08:43 PM
Excel columns do they exceed IV? James Dalton Excel Worksheet Functions 6 June 10th 07 10:12 PM


All times are GMT +1. The time now is 06:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"