Indian PAN Format

Oh!Calcutta

New Member
Joined
Jun 15, 2011
Messages
26
Hi All,

Can anyone help me frame a Data Validation formula for Indian PAN in a column? The data structure is 5 Alphabets 4 numbers and an Alphabet (i.e. field length is 10).

Thanks in advance.:biggrin:
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Cell H9 is where you will enter the PAN number.

Try this formula under Data Validation - > Custom -

=AND(ISERROR(VALUE(MID(H9,6,4)))=FALSE,ISERROR(VALUE(LEFT(H9,2)))=TRUE,ISERROR(VALUE(RIGHT(H9,1)))=TRUE)
 
Upvote 0
Hi,

Please find the formula

=IF(LEN(A1)=10,IF(AND(SUMPRODUCT(--(CODE(MID(A1,{1,2,3,4,5,10},1))>=65),--(CODE(MID(A1,{1,2,3,4,5,10},1))<=90))=6,SUMPRODUCT(--(CODE(MID(A1,{6,7,8,9},1))>=48),--(CODE(MID(A1,{6,7,8,9},1))<=57))=4),"OK","NOT OK"),"NOT OK")

Regards,

Ashok Pai
 
Upvote 0
Cell H9 is where you will enter the PAN number.

Try this formula under Data Validation - > Custom -

=AND(ISERROR(VALUE(MID(H9,6,4)))=FALSE,ISERROR(VALUE(LEFT(H9,2)))=TRUE,ISERROR(VALUE(RIGHT(H9,1)))=TRUE)


Hi,

I need validation in which starting 4 will be alphabetical and last 10 will be numeric. Please help me out.
 
Upvote 0
I need validation in which starting 4 will be alphabetical and last 10 will be numeric. Please help me out.
Duplicate: https://www.mrexcel.com/forum/excel-questions/1056864-excel-validation-formula.html

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will typically be locked or deleted (rule 12 here: Forum Rules).

Anyone wishing to answer this question, please do so on the other thread.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,715
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top