Hi All,
Need the formula to validate Indian Permanent Account Number (PAN) in Excel. The rules for validation should be as below:
• Length should be 10
• First 5 character should be text - [A-Z]
• Next 4 should be number
• Last character should be text - [A-Z]
I am currently using the following formula in Data validation -
=AND(NOT(SUM(--ISNUMBER(VALUE(MID(A1,ROW(INDIRECT("1:5")),1))))),SUM(--ISNUMBER(INT(MID(A1,ROW(INDIRECT("6:9")),1))))=4,NOT(--ISNUMBER(RIGHT(A1,1))),LEN(A1)=10)
But this has certain problems - 1) It allows space as a character for the text part and 2) Numbers are also allowed for the last digit.
Thanks.
Regards
Bookmarks