#1   Report Post  
andrewm
 
Posts: n/a
Default validation rule


Hi - I have a roster in which in a range a1:a10, a15:a20 I will be
putting names in.
eg. andrew, charles, abdul, tony. Andrew or Charles, and abdul or
tony can only occur once. how can I do a data validation on this.

ie. andrew or charles can occur only once, abdul or tony can occur
only once in the ranges

A1:A10, A15:A20

thanks

andrewm


--
andrewm
------------------------------------------------------------------------
andrewm's Profile: http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=380801

  #2   Report Post  
Ron Coderre
 
Posts: n/a
Default

Try this:
1)Select A1:A10 (with A1 as the active cell)
2)DataValidation
Allow: Custom
Formula: =COUNTIF(A$1:A1,A1)=1

Then, with A15:A20 (A15 active)
DataValidation
Allow: Custom
Formula: =COUNTIF(A$15:A20,A15)=1

Those will allow any entry in the lists, but no duplicates.

Does that help?

--
Regards,
Ron

  #3   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

Custom validation with formula
=COUNTIF($A$1:$A$10,A1)+COUNTIF($A$15:$A$20,A1)<2

Jerry

andrewm wrote:

Hi - I have a roster in which in a range a1:a10, a15:a20 I will be
putting names in.
eg. andrew, charles, abdul, tony. Andrew or Charles, and abdul or
tony can only occur once. how can I do a data validation on this.

ie. andrew or charles can occur only once, abdul or tony can occur
only once in the ranges

A1:A10, A15:A20

thanks

andrewm


  #4   Report Post  
andrewm
 
Posts: n/a
Default


Hi - the validation rule works but
how do I make it specific for the names specified. Other names (eg
John) can be entered in more than once.

andrewm


--
andrewm
------------------------------------------------------------------------
andrewm's Profile: http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=380801

  #5   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

You can create a list with the names, and the number of occurrences
allowed. For example:

John 2
Tony 1

Name this range, e.g. LookupList

Then, in the data validation dialog box, use a formula that refers to
this list. For example:

=COUNTIF($B$1:$B$16,B1)<=VLOOKUP(B1,LookupList,2,0 )

andrewm wrote:
Hi - the validation rule works but
how do I make it specific for the names specified. Other names (eg
John) can be entered in more than once.

andrewm




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



  #6   Report Post  
andrewm
 
Posts: n/a
Default


Hi Team,

unfortunately in the roster I have 2 ranges
say
the names - andrew can go in a1:a10, charles can go in a15:a20 but not
both
also tony can go in a1:10, abdul can go in a15:20, but not
both

any ideas

andrewm


--
andrewm
------------------------------------------------------------------------
andrewm's Profile: http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=380801

  #7   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

Perhaps, if you clearly outline all the rules, someone will be able to
help you with a data validation formula.

andrewm wrote:
Hi Team,

unfortunately in the roster I have 2 ranges
say
the names - andrew can go in a1:a10, charles can go in a15:a20 but not
both
also tony can go in a1:10, abdul can go in a15:20, but not
both

any ideas

andrewm




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #8   Report Post  
andrewm
 
Posts: n/a
Default


Sorry I'll try to explain what I need - in the roster there are two
ranges in which a person's name is placed. However in one range their
full name is placed and in the other range their initials are placed.
there name can only by placed once (either their full name or their
initials)
(initials are used in one range as the cells are too small for their
full name)

ie.

range 1. A1:A5 - names thus - joe blogs, tom jones
range 2. c10:c20 - initials thus jb , tj

joe blogs and jb are the same person, tom jones and tj are the same
person.

thanks

andrewm


--
andrewm
------------------------------------------------------------------------
andrewm's Profile: http://www.excelforum.com/member.php...o&userid=23130
View this thread: http://www.excelforum.com/showthread...hreadid=380801

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
Data Validation Mike R Excel Discussion (Misc queries) 11 May 6th 05 03:38 AM
Data Validation gbeard Excel Worksheet Functions 1 May 3rd 05 10:09 AM
data validation gbeard Excel Worksheet Functions 2 May 2nd 05 10:57 PM
Effect of Conditional Formatting, Data Validation Bill Sturdevant Excel Discussion (Misc queries) 1 January 26th 05 12:50 AM
Data Validation Window? Ken Excel Discussion (Misc queries) 1 January 11th 05 11:48 PM


All times are GMT +1. The time now is 09:30 PM.

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

About Us

"It's about Microsoft Excel"