
Originally Posted by
in.vaibhav
Hi
There is one more requirement in this UDF, 4Th Character should be P for Individulas, C for Company & so on.
So how can we check that & also whether we can give output with error instead of say True or False.
EG. Length should be 10, First 5 character should be text, Next 6-9 character should be number, Last character should be text, 4th character should be either of P,H,F,A,T,B,L,J,G.
Thanks & Regards
This should account for the requirement you posted about...
Code:
Function IsPAN(S As String) As Boolean
IsPAN = S Like "[A-Za-z][A-Za-z][A-Za-z][ABFGHJLPTabfghjlpt][A-Za-z]####[A-Za-z]"
End Function
Bookmarks