1. Hello Everyone,

I have a designed a workbook to get the information about certain project. In this i have feild Project ID this field should contain 8-digit numeric value neither less nor large.
For ex 12345678 if it is less than 8 digit than i want user to write it as 01234567.
I tried validation by setting text lenght min = 8 and max = 8 it worked but it allows user to enter characters or alpha numeric values which i dont want.

So can you help me out.

Thanks
Bharat

2. You can use the validation formula of:

=AND(MAX(LEN(A1))=8,MIN(LEN(A1))=8,ISNUMBER(A1*1))

3. Set the Number format of the cell to Text.
In the Data |Validation dialog, set Allow to Custom, then enter the following formula in the Formula box:

=AND(LEN(A1)=8,NOT(ISERROR(VALUE(A1))))

(this is for cell A1, replace A1 with the correct cell reference)

4. [quote name='mbarron' post='793879' date='18-Sep-2009 16:06']You can use the validation formula of:

=AND(MAX(LEN(A1))=8,MIN(LEN(A1))=8,ISNUMBER(A1*1))[/quote]
Max, I don't think that MAX and MIN will help here since we're working with a single cell.

5. The Min and Max did not have an adverse effect, but are in fact unnecessry - which your solution also indicates. It can simplified to:
=AND(LEN(A1)=8,ISNUMBER(A1*1))

6. [quote name='mbarron' post='793879' date='18-Sep-2009 19:36']You can use the validation formula of:

=AND(MAX(LEN(A1))=8,MIN(LEN(A1))=8,ISNUMBER(A1*1))[/quote]

Thanks a lot. It worked for me.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•