PC Review


Reply
Thread Tools Rate Thread

Data validation two criteria

 
 
Graham Haughs
Guest
Posts: n/a
 
      25th Feb 2006
Is it possible to do two criteria for cells entered in a column using
data validation. I already prevent numeric entries by using a custom
validation criteria eg =NOT(ISNUMBER(A5)) but I would also like to
prevent or alert to duplicates in the column using another custom
criteria eg =COUNTIF($A$1:$A$100,A5)<=1. Can these two be combined in
any way to achieve the desired result? I value any assistance.

Kind Regards
Graham Haughs
Turriff
Scotland
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      25th Feb 2006
=AND(NOT(ISNUMBER(A5)) ,COUNTIF($A$1:$A$100,A5)<2)

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Graham Haughs" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is it possible to do two criteria for cells entered in a column using
> data validation. I already prevent numeric entries by using a custom
> validation criteria eg =NOT(ISNUMBER(A5)) but I would also like to
> prevent or alert to duplicates in the column using another custom
> criteria eg =COUNTIF($A$1:$A$100,A5)<=1. Can these two be combined in
> any way to achieve the desired result? I value any assistance.
>
> Kind Regards
> Graham Haughs
> Turriff
> Scotland



 
Reply With Quote
 
Graham Haughs
Guest
Posts: n/a
 
      25th Feb 2006
Thanks Bob. I was trying If statements and failing miserably, but once
again I am shamed with the simplicity, although it is only simple if you
know what you are doing. Many thanks.

Graham

Bob Phillips wrote:
> =AND(NOT(ISNUMBER(A5)) ,COUNTIF($A$1:$A$100,A5)<2)
>
> --
>
> HTH
>
> Bob Phillips
>
> (remove nothere from the email address if mailing direct)
>
> "Graham Haughs" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>>Is it possible to do two criteria for cells entered in a column using
>>data validation. I already prevent numeric entries by using a custom
>>validation criteria eg =NOT(ISNUMBER(A5)) but I would also like to
>>prevent or alert to duplicates in the column using another custom
>>criteria eg =COUNTIF($A$1:$A$100,A5)<=1. Can these two be combined in
>>any way to achieve the desired result? I value any assistance.
>>
>>Kind Regards
>>Graham Haughs
>>Turriff
>>Scotland

>
>
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      25th Feb 2006
The thing to remember with Data Validation (and Conditional Formatting) is
that it only needs a TRUE result to fire it, so the IF is not necessary,
just a test that returns TRUE or FALSE.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Graham Haughs" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Thanks Bob. I was trying If statements and failing miserably, but once
> again I am shamed with the simplicity, although it is only simple if you
> know what you are doing. Many thanks.
>
> Graham
>
> Bob Phillips wrote:
> > =AND(NOT(ISNUMBER(A5)) ,COUNTIF($A$1:$A$100,A5)<2)
> >
> > --
> >
> > HTH
> >
> > Bob Phillips
> >
> > (remove nothere from the email address if mailing direct)
> >
> > "Graham Haughs" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >
> >>Is it possible to do two criteria for cells entered in a column using
> >>data validation. I already prevent numeric entries by using a custom
> >>validation criteria eg =NOT(ISNUMBER(A5)) but I would also like to
> >>prevent or alert to duplicates in the column using another custom
> >>criteria eg =COUNTIF($A$1:$A$100,A5)<=1. Can these two be combined in
> >>any way to achieve the desired result? I value any assistance.
> >>
> >>Kind Regards
> >>Graham Haughs
> >>Turriff
> >>Scotland

> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple data validation criteria? ker_01 Microsoft Excel Worksheet Functions 1 18th Feb 2010 03:42 PM
Data Validation with 2 criteria Dana M Microsoft Excel Worksheet Functions 6 7th Feb 2009 11:13 PM
Data Validation With Multiple Criteria Korski Microsoft Access Forms 3 22nd Feb 2008 02:58 AM
Data Validation criteria blatham Microsoft Excel Discussion 1 8th Nov 2005 10:01 PM
Data Validation Criteria taych Microsoft Excel Programming 4 26th Apr 2004 08:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:38 AM.