Data Validation

G

Guest

Two questions:
1st data validation issue: I don't want the data entry people to have to
stop typing and pick up the mouse to click from a drop down list so how can I
make a cell accept either Y, y, N, or n using the custom formula?

2nd validation issue: I am requiring that a cell contain the first letter M
followed by 8 digits and 8 digits only. I've got the validation mask below
and although it works for allowing only an M and numbers, it allows the user
to enter as many numbers as they want whereas I only want to allow 8. How
can I also restrict it to being 8 numbers after the M and only 8 numbers?

=AND(LEFT(A6,1)="m",RIGHT(A6,8)*1>0,RIGHT(A6,8)*1<=99999999)

Any assistance that anyone could provide would be very much appreciated.
Sam
 
G

Guest

How about just checking the length...

=AND(LEFT(A6,1)="m",RIGHT(A6,8)*1>0,RIGHT(A6,8)*1<=99999999, len(A6) = 9)
 
G

Guest

You are brilliant. Thanks so much. Worked perfectly and I figured out the
Y,y,N,n issue on my own so I'm good to go now. Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top