Validate the format of PAN with ISPAN (Excel custom function). It will return TRUE if PAN is in correct format or else return FALSE with an option to show what is wrong with the PAN. The VBA coding is open and can be viewed by pressing Alt + F11. #zip