Set an Input Mask with Data Validation??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to set data validation on cells to only allow:

C-###-#####-#### (# is any digit)

Is there a way I can use the equivalent of an Input Mask, or do I have to
write a big long formula?

Thanks
Rob
 
I can't think of anything that supports this without a formula, but try this
one with Data=>Validation, Custom

=AND(LEFT(A1,1)="C",LEN(A1)=16,ISNUMBER(SUBSTITUTE(RIGHT(A1,14),"-","")*1),L
EN(SUBSTITUTE(RIGHT(A1,14),"-",""))=12)
 

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

Similar Threads

A data validation question 1
Input Mask 2
Hidi keyed input with asterisk 3
Cell input mask 3
Dynamic userform help - Data Validation 3
Input mask for date! 0
execute assigned data validation in vba? 11
Input Mask 3

Back
Top