Valided alphanumeric value
Try this UDF either in a cell or in a custom validation formula:
Function Val_AN(ANstring)
Val_AN = True
If Len(ANstring) < 10 Then
Val_AN = False
Else
For d = 1 To 10
If d <= 5 Or d = 10 Then
If Mid(ANstring, d, 1) < "A" Or Mid(ANstring, d, 1) "Z" Then
Val_AN = False
Exit For
End If
Else
If Mid(ANstring, d, 1) < "0" Or Mid(ANstring, d, 1) "9" Then
Val_AN = False
Exit For
End If
End If
Next d
End If
End Function
Regards,
Stefi
€˛Montu€¯ ezt Ć*rta:
I want to valided or check of a cell value which content alphanumeric. the
features of alphanumeric value is -
1) lenth should not exceed 10
2) First five character should be alphabatic, next four character should be
numeric & last character should be alphabetic. as example - ABCDE1234E
So is there any way to do the same.
Thanks in advance.
|