View Single Post
  #4   Report Post  
Jack Sheet
 
Posts: n/a
Default

That worked fine, thanks (I just changed the "" to "=" to enable zeros to
count as TRUE).
Regards

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Actually, I forgot about the positive integral part.

Change the Data validation formula to

=B1

and in B1, enter the formula


=OR(A1="BR",A1="NT",AND(NOT(ISERROR(FIND(RIGHT(A1, 1),"LPTVY"))),IF(NOT(ISERR

OR(VALUE(LEFT(A1,LEN(A1)-1)))),AND(VALUE(LEFT(A1,LEN(A1)-1))0,INT(VALUE(LEF

T(A1,LEN(A1)-1)))=VALUE(LEFT(A1,LEN(A1)-1))),FALSE)),AND(NOT(ISERROR(FIND(LE

FT(A1,1),"KD"))),IF(NOT(ISERROR(VALUE(RIGHT(A1,LEN (A1)-1)))),AND(VALUE(RIGHT

(A1,LEN(A1)-1))0,INT(VALUE(RIGHT(A1,LEN(A1)-1)))=VALUE(RIGHT(A1,LEN(A1)-1))
),FALSE)))

You need to use cell B1 because the formula is longer than the data
validation formula length limit.

HTH,
Bernie
MS Excel MVP


"Jack Sheet" wrote in message
...
Hi all

I want to set data validation on a cell so that it will accept the

following
(and only the following) text strings:
(1) "BR" (literally)
or
(2) "NT" (literally)
or
(3) "nA" where n is any positive integral numerical value including zero

and
A may take any of the values "L", "P", "T", "V" or "Y"
or
(4) "An" where n is any positive integral numerical value including zero

and
A may take either of the values "K" or "D".

Is this possible, please, and if so how? thanks

--
Return email address is not as DEEP as it appears