Another solution

 

=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)

 

Rajan.

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On 
Behalf Of Sam Mathai Chacko
Sent: Feb/Mon/2012 07:22
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ $$Excel-Ma​cros$$ Validate text and number in PAN

 

Ah! Quote Haseeb {I think this part ISNUMBER(--MID(A3,6,4)) will allow entry 
with 3 spaces before the fourth digit :-) , like}

I think that's a very good catch Haseeb. :)

I think adding an IFERROR(FIND(" ",Range)) will solve the problem.....

Regards,
Sam Mathai Chacko

On Mon, Feb 27, 2012 at 12:50 PM, Vijayendra Rao <vijayendrar...@gmail.com> 
wrote:

Thanks Sam, Maries & Haseeb.

 

All three solutions are working fine.....thanks again.

 

Regards,

Vijayendra

2012/2/27 Haseeb Avarakkan <haseeb.avarak...@gmail.com>

Hi Sam,

I think this part ISNUMBER(--MID(A3,6,4)) will allow entry with 3 spaces before 
the fourth digit :-) , like

ABCDE   1D

Hi Vijayendra,

This is my try. Firstly define 3 names to avoid INDIRECT function.

Name: Alpha
On refers to: 
={"A";"B";"C";"D";"E";"F";"G";"H";"I";"J";"K";"L";"M";"N";"O";"P";"Q";"R";"S";"T";"U";"V";"W";"X";"Y";"Z"}

Name: Row
Refers to: ={1;2;3;4;5}

Name: Col
Refers to: ={6,7,8,9}

Then use this formula in Data Validation >> Custom. Make sure you have unselect 
Ignore blank

=SUMPRODUCT(ISNUMBER(MATCH(MID(C2,Row,1),Alpha,0))*ISNUMBER(MID(C2,Col,1)+0)*ISNUMBER(MATCH(MID(C2,10,250),Alpha,0)))=20

HTH
Haseeb 

 

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
 
------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com





-- 

ಧನ್ಯವಾದಗಳು,

ವಿಜಯೇಂದ್ರ,

೯೪೪೯೧ ೬೭೬೩೧

 

Regards,
Vijayendra
94491 67631

 

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
 
------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com




-- 
Sam Mathai Chacko

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
 
------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to