Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Validation from Exclusion list

Hello all,

Is there any way in Excel if I want to do this:
I have a list of code that MUST NOT be entered by user(let's called this
'blacklist")
Objective is when user enter a code that is in the 'blacklist' then he got a
Warning otherwise, the code is OK. eg. the black list is 1,2,3,4,5. and when
he enter 3, the validation will look at the list and it will give a warning.
but when he enter 0 or other than in the list, then the code can be entered
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Validation from Exclusion list

Hi Jim

Select the range of cells you want to apply the validation (I am assuming
they are in column A)
DataValidationFormula =OR(A1<1,A15)
On the Error tab, type a message like "Cannot use values between 1 and 5"

Change A1 to the first cell reference in the range you have selected.
--
Regards
Roger Govier

"Jim" wrote in message
...
Hello all,

Is there any way in Excel if I want to do this:
I have a list of code that MUST NOT be entered by user(let's called this
'blacklist")
Objective is when user enter a code that is in the 'blacklist' then he got
a
Warning otherwise, the code is OK. eg. the black list is 1,2,3,4,5. and
when
he enter 3, the validation will look at the list and it will give a
warning.
but when he enter 0 or other than in the list, then the code can be
entered
Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Validation from Exclusion list

Thanks for your prompt response Roger
It was just an example while the fact is the list is:
Unsorted and contained char eg. A231,F432, or B332, etc. This list will be
updated/added based on input from other department. What I want is that user
may not enter codes that are in the list.

Thanks b4
"Roger Govier" wrote:

Hi Jim

Select the range of cells you want to apply the validation (I am assuming
they are in column A)
DataValidationFormula =OR(A1<1,A15)
On the Error tab, type a message like "Cannot use values between 1 and 5"

Change A1 to the first cell reference in the range you have selected.
--
Regards
Roger Govier

"Jim" wrote in message
...
Hello all,

Is there any way in Excel if I want to do this:
I have a list of code that MUST NOT be entered by user(let's called this
'blacklist")
Objective is when user enter a code that is in the 'blacklist' then he got
a
Warning otherwise, the code is OK. eg. the black list is 1,2,3,4,5. and
when
he enter 3, the validation will look at the list and it will give a
warning.
but when he enter 0 or other than in the list, then the code can be
entered
Thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Validation from Exclusion list

Hi Jim

In which case, create a list of your "bad" values.
Say this is in column A of Sheet2.
InsertNameDefineName List1
Refers to =Sheet2!$A$1:INDEX(Sheet2!$A:$A),COUNTA(Sheet2!$A: $A))

This list is dynamic and will grow as you add more entries to column A on
Sheet2

Now, in your Data Validation cells use Custom =ISNA(MATCH(A1,List1,0))
--
Regards
Roger Govier

"Jim" wrote in message
...
Thanks for your prompt response Roger
It was just an example while the fact is the list is:
Unsorted and contained char eg. A231,F432, or B332, etc. This list will be
updated/added based on input from other department. What I want is that
user
may not enter codes that are in the list.

Thanks b4
"Roger Govier" wrote:

Hi Jim

Select the range of cells you want to apply the validation (I am assuming
they are in column A)
DataValidationFormula =OR(A1<1,A15)
On the Error tab, type a message like "Cannot use values between 1 and 5"

Change A1 to the first cell reference in the range you have selected.
--
Regards
Roger Govier

"Jim" wrote in message
...
Hello all,

Is there any way in Excel if I want to do this:
I have a list of code that MUST NOT be entered by user(let's called
this
'blacklist")
Objective is when user enter a code that is in the 'blacklist' then he
got
a
Warning otherwise, the code is OK. eg. the black list is 1,2,3,4,5. and
when
he enter 3, the validation will look at the list and it will give a
warning.
but when he enter 0 or other than in the list, then the code can be
entered
Thanks


  #5   Report Post  
Posted to microsoft.public.excel.misc
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Validation from Exclusion list

Thanks a lot Roger. You make my life brighter!
Cheers

"Roger Govier" wrote:

Hi Jim

In which case, create a list of your "bad" values.
Say this is in column A of Sheet2.
InsertNameDefineName List1
Refers to =Sheet2!$A$1:INDEX(Sheet2!$A:$A),COUNTA(Sheet2!$A: $A))

This list is dynamic and will grow as you add more entries to column A on
Sheet2

Now, in your Data Validation cells use Custom =ISNA(MATCH(A1,List1,0))
--
Regards
Roger Govier

"Jim" wrote in message
...
Thanks for your prompt response Roger
It was just an example while the fact is the list is:
Unsorted and contained char eg. A231,F432, or B332, etc. This list will be
updated/added based on input from other department. What I want is that
user
may not enter codes that are in the list.

Thanks b4
"Roger Govier" wrote:

Hi Jim

Select the range of cells you want to apply the validation (I am assuming
they are in column A)
DataValidationFormula =OR(A1<1,A15)
On the Error tab, type a message like "Cannot use values between 1 and 5"

Change A1 to the first cell reference in the range you have selected.
--
Regards
Roger Govier

"Jim" wrote in message
...
Hello all,

Is there any way in Excel if I want to do this:
I have a list of code that MUST NOT be entered by user(let's called
this
'blacklist")
Objective is when user enter a code that is in the 'blacklist' then he
got
a
Warning otherwise, the code is OK. eg. the black list is 1,2,3,4,5. and
when
he enter 3, the validation will look at the list and it will give a
warning.
but when he enter 0 or other than in the list, then the code can be
entered
Thanks


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
Find and Replace exclusion Jenn Excel Discussion (Misc queries) 8 April 6th 09 08:45 PM
How do we make Inclusion-Exclusion Principles on Excel? wewetts Excel Worksheet Functions 0 June 6th 07 01:44 PM
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
MATCH function, exclusion question Paul Lautman Excel Discussion (Misc queries) 4 July 21st 06 04:53 AM


All times are GMT +1. The time now is 03: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"