reg: pan characteristics

Copper Contributor

hello everyone,

i have a doubt regarding which combination of functions to be used for verifying the characteristics of a pan,i.e.  every pan  has 4 numerics and 6 alphabets,so i need to verify it using a function whether the pan has 4 numerics and 6 alphabets.

1 Reply

Hi dinesh,

 

Assuming your string has only numbers and alphabet characters, no other symbols, the formula could be

=AND(
   (SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1,{0,1,2,3,4,5,6,7,8,9},"")))=4),
   ((LEN(A1)-SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1,{0,1,2,3,4,5,6,7,8,9},"")))=6))
)

First part calculates counts number of numeric characters in the string, subtracting  it from the length of the string in second part with have number of alphabets. AND compares with 4 and 6 above numbers and returns TRUE/FALSE result.