multiple data validation

A

aditya

i want to do 2 data validation at a time for same cell e.g.

(1)text length should be exactly 10
(2)First two letter should be either of 'NW" OR "UP" OR "DN"
(3)Next two letter be either of "NR" OR "WR"
(4)Rest 6 can be anything

e.g. UPWR123421
DNWR12/345
 
L

Luke M

Assuming cell A1:
Under Validation, choose Custom. Input this as your formula:

=AND(LEN(A1)=10,OR(LEFT(A1,2)="NW",LEFT(A1,2)="UP",LEFT(A1,2)="DN"),OR(MID(A1,3,2)="NR",MID(A1,3,2)="WR"))
 
S

Sean Timmons

Assuming the data is in A1, In Data/Validation, use custom and enter the below.

=IF(AND(LEN(A1)=10,OR(LEFT(A1,2)="NW",LEFT(A1,2)="UP",LEFT(A1,2)="DN"),OR(MID(A1,3,2)="NR",MID(A1,3,2)="WR")),TRUE,FALSE)
 
J

Jarek Kujawa

Data->Data validation->Custom->insert the formula:

=AND(OR(LEFT(A1,2)="NW",LEFT(A1,2)="UP",LEFT(A1,2)="DN"),OR(MID(A1,3,2)
="NR",MID(A1,3,2)="WR"),LEN(A1)=10)

pls click YES if this helped
 
Top