View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Alan Moseley Alan Moseley is offline
external usenet poster
 
Posts: 75
Default Is this number validation possible?

In answer to your question, yes it can be done by a formula, which is
something like:-

=IF(AND(LEN(A1)=5,NOT(ISERROR(FIND("1",A1))),NOT(I SERROR(FIND("2",A1))),NOT(ISERROR(FIND("3",A1))),N OT(ISERROR(FIND("4",A1))),NOT(ISERROR(FIND("5",A1) ))),TRUE,FALSE)

Do I win?
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Forum freak (at work)" wrote:

Hi

I need to validate the contents of a cell based on the following.

It must be a 5 digit number.
The 5 numbers can only be 1,2,3,4, & 5
Each number can only be used once.

This will be a test included in a macro however could it be done by formula?

Any help would be appreciated.

Kenny W
Using XP Pro and Excel 2003