If the PAN is in A2, enter this formula in B2

=AND(COUNT(MID(A2,{6,7,8,9},1)+0)=4,COUNT(SEARCH(" ~"&MID(A2,{1,2,3,4,5,10},{1,1,1,1,1,999}),"ABCDEFG HIJKLMNOPQRSTUVWXYZ"))=6)

and in A2, use the DV formula as =B2=TRUE