I've run in a problem writing a formula that will basically validate what the user enters. So for example, i need a user to input a password using the following criteria:
- 12 characters long
- 1st character must be an Uppercase Letter
- Characters 2-10 must be Lowercase letters
- Character 11 must be one of the following special characters (!@$*+)
- Character 12 must be a number 0-9
Below I have everything but the special characters figured out, in my example code I am currently using only one special character at the moment (!). Below is what i have so far and i cant figure out how to get those specified special characters to validate on character 11. ASCII number code separates them (! = 33, @ = 64, $ = 36, * = 42, + = 43), would be perfect if i could just have those specified special characters validate on character 11, any suggestions?:
=(LEN(BOPassword)=12)
+(CODE(MID(BOPassword,1,1))>64)
+(CODE(MID(BOPassword,1,1))<91)
+(CODE(MID(BOPassword,2,1))>96)
+(CODE(MID(BOPassword,2,1))<123)
+(CODE(MID(BOPassword,3,1))>96)
+(CODE(MID(BOPassword,3,1))>123)
+(CODE(MID(BOPassword,4,1))>96)
+(CODE(MID(BOPassword,4,1))<123)
+(CODE(MID(BOPassword,5,1))>96)
+(CODE(MID(BOPassword,5,1))<123)
+(CODE(MID(BOPassword,6,1))>96)
+(CODE(MID(BOPassword,6,1))<123)
+(CODE(MID(BOPassword,7,1))>96)
+(CODE(MID(BOPassword,7,1))<123)
+(CODE(MID(BOPassword,8,1))>96)
+(CODE(MID(BOPassword,8,1))<123)
+(CODE(MID(BOPassword,9,1))>96)
+(CODE(MID(BOPassword,9,1))<123)
+(CODE(MID(BOPassword,10,1))>96)
+(CODE(MID(BOPassword,10,1))<123)
+(CODE(MID(BOPassword,11,1))>32)
+(CODE(MID(BOPassword,11,1))<34)
+(CODE(MID(BOPassword,12,1))>47)
+(CODE(MID(BOPassword,12,1))<58)
=25