Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Can anybody help on an excel formula requirement.....?

Iam in requirement of a formula in excel for recognising text and
formula for data validation as below.

Validation required:-

1 - The cell should consist of only 10 characters
2 - The first 5 characters should be only text charecters ( eg:
a,b,c........).
3 - The next 4 characters should be only numeric characters ( eg:
1,2,3.....).
4 - The last 10th character should be a text chracter only.

Is this validation possible in excel...........?

If Yes, How ........?,Please....!


Thanks in Advance

Regards
Thyagaraj

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can anybody help on an excel formula requirement.....?


Thyagaraj Wrote:
Iam in requirement of a formula in excel for recognising text and
formula for data validation as below.

Validation required:-

1 - The cell should consist of only 10 characters
2 - The first 5 characters should be only text charecters ( eg:
a,b,c........).
3 - The next 4 characters should be only numeric characters ( eg:
1,2,3.....).
4 - The last 10th character should be a text chracter only.

Is this validation possible in excel...........?

If Yes, How ........?,Please....!


Thanks in Advance

Regards
Thyagaraj


This is by no means a complete answer to your question.

If you go to Data - Validation... then where it says Allow, choose
Custom.

This will check for the length and the middle 4 being numbers: (I'm
assuming this cell is A1)

=IF(AND(LEN(A1)=10, ISNUMBER(MID(A1,6,4))),TRUE,FALSE)

As for checking the remaining characters for their valid values, I'm
not sure what the exact limitations you have on them are. In addition,
I don't really have any ideas on how to check without writing a custom
function to call. Someone else may have to give you ideas on how to
check the other 6 characters. If you figure out a way, just slip it in
the AND(.. , .. , ..).

Scott


--
Maistrye
------------------------------------------------------------------------
Maistrye's Profile: http://www.excelforum.com/member.php...o&userid=36078
View this thread: http://www.excelforum.com/showthread...hreadid=563935

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Can anybody help on an excel formula requirement.....?

On 21 Jul 2006 20:54:24 -0700, "Thyagaraj" wrote:

Iam in requirement of a formula in excel for recognising text and
formula for data validation as below.

Validation required:-

1 - The cell should consist of only 10 characters
2 - The first 5 characters should be only text charecters ( eg:
a,b,c........).
3 - The next 4 characters should be only numeric characters ( eg:
1,2,3.....).
4 - The last 10th character should be a text chracter only.

Is this validation possible in excel...........?

If Yes, How ........?,Please....!


Thanks in Advance

Regards
Thyagaraj


Here's one method.

Download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr


In some unused cell (eg AA1), enter the formula (assuming you wish to validate
the entry in A1):

=REGEX.COUNT(A1,"^[A-Za-z]{5}\d{4}[A-Za-z]$")

In A1, use the Data Validation formula:

=AA1=1

------------------------------

You need to do it this way as Data Validation formulas must be contained on the
worksheet. The same would hold true for any custom formulas.

The above is a "Regular Expression". The formula counts the number of times
the Regular Expression is found -- in this case we want to see a count of 1.

The regular expression means that A1 must match its pattern exactly in the
order.

^[A-Za-z]{5}\d{4}[A-Za-z]$

^ Start of string
[A-Za-z]{5} Five characters that are letters only
\d{4} Four characters that are digits only
[A-Za-z] One character that is a letter only
$ End of string


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with difficult formula requirement XMan Excel Worksheet Functions 1 December 10th 09 01:11 AM
bedroom requirement robzrob Excel Worksheet Functions 1 August 10th 08 07:51 PM
How can I setup an If, Then, else requirement in excel? Formuls - If, Then, Else Excel Worksheet Functions 1 January 3rd 07 05:42 PM
formula requirement pcor New Users to Excel 6 January 7th 06 10:47 PM
if until requirement met Greg Wilson Excel Programming 10 July 28th 05 07:31 PM


All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"