Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JLS JLS is offline
external usenet poster
 
Posts: 4
Default How do you create a list & data validation in same cell?

I have a range of 7 cells in a column. I want to be able to

a-allow only a "True" input (from a drop down list unless there is another
way to accomplish this)

b-if any of the other cells already contain "True", they can not duplicate
the entry in the other cells and display an error message that says they can
answer "True" only once in the range of cells.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,979
Default How do you create a list & data validation in same cell?

Select the cells where you want the validation (B3:B9 in this example)
Choose Data Validation
From the Allow dropdown, choose Custom
In the Source box, type:
=OR(AND(COUNTIF($B$3:$B$9,TRUE)=1,B3=TRUE),B3="")
where B3 is a reference to the active cell

On the Error Alert tab, enter the message you want to appear if an
invalid entry is made
Click OK

JLS wrote:
I have a range of 7 cells in a column. I want to be able to

a-allow only a "True" input (from a drop down list unless there is another
way to accomplish this)

b-if any of the other cells already contain "True", they can not duplicate
the entry in the other cells and display an error message that says they can
answer "True" only once in the range of cells.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 158
Default How do you create a list & data validation in same cell?

I don't know of a way to PREVENT the second entry of "True" in another of the
seven cells. As you said you can use Data Validation to allow only "True" to
be entered. When you set this up, you want validation from a list, then in
the window below type 'True (single quote T-r-u-e) to prevent Excel from
treating "True" as a logical operator.

Now, in the cell below your seventh True cell, you could put in the formula:

=IF(COUNTA($A$2:$A$8)1,"You may enter a value of 'True' in ony one of the
highlighted cells above","")

(where A2-A8 are your seven cells), which will make a message appear if the
user enters a second "True". But it does not actually prevent them from
doing so.

Another way to do the error flag is to put this formula in the cell to the
right of the first of the seven cells, then copy it down to the 7th:

=IF(AND(COUNTA($A$2:$A$8)1,(A2="True")),"You may enter a value of 'True' in
ony one of the highlighted cells above","")

Using this, each of the cells with "True" get flagged, until the user
complies by deleting any extra entries.

HTH


"JLS" wrote:

I have a range of 7 cells in a column. I want to be able to

a-allow only a "True" input (from a drop down list unless there is another
way to accomplish this)

b-if any of the other cells already contain "True", they can not duplicate
the entry in the other cells and display an error message that says they can
answer "True" only once in the range of cells.

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
Color cell validation? jjh Excel Discussion (Misc queries) 4 July 9th 06 02:04 AM
Dependent List (via Data Validation) Error Dezdan Excel Worksheet Functions 2 December 2nd 05 12:33 AM
Data Validation and Blanks in List GoneRural Excel Worksheet Functions 1 October 26th 05 05:03 PM
Printing data validation scenarios SJC Excel Worksheet Functions 14 July 24th 05 12:43 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 08:03 PM.

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"