Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: Ireland
Posts: 29
Default Validation on cell

Is it possible to apply a validation to a cell to allow only a 7 digit number followed by any letter from A to W e.g 1234567T?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 411
Default Validation on cell

try placing the following formula in the "formula" section of the data
validation dialog box.

=AND(LEN(A1)=8,NOT(ISNUMBER(VALUE(RIGHT(A1,1)))))
  #3   Report Post  
Junior Member
 
Location: Ireland
Posts: 29
Default

Quote:
Originally Posted by dan dungan View Post
try placing the following formula in the "formula" section of the data
validation dialog box.

=AND(LEN(A1)=8,NOT(ISNUMBER(VALUE(RIGHT(A1,1)))))
Many thanks for you help. There is still a slight problem as that validation would permit a letter or other character in the first 7 digits and I only want numbers in the first 7 places.

regards

MJD
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Validation on cell

=AND(LEN(A1)=8,ISNUMBER(--(LEFT(A1,7))),CODE(RIGHT(A1,1))=65,CODE(RIGHT(A1, 1))<=90)


the above will not allow lower case at the end, if you want that the users
to be able to enter both a and A use


=AND(LEN(A1)=8,ISNUMBER(--(LEFT(A1,7))),CODE(UPPER(RIGHT(A1,1)))=65,CODE(UP PER(RIGHT(A1,1)))<=90)

--


Regards,


Peo Sjoblom

"dalymjl" wrote in message
...

dan dungan;716380 Wrote:
try placing the following formula in the "formula" section of the data
validation dialog box.

=AND(LEN(A1)=8,NOT(ISNUMBER(VALUE(RIGHT(A1,1)))))


Many thanks for you help. There is still a slight problem as that
validation would permit a letter or other character in the first 7
digits and I only want numbers in the first 7 places.

regards

MJD




--
dalymjl



  #5   Report Post  
Junior Member
 
Location: Ireland
Posts: 29
Smile

Quote:
Originally Posted by Peo Sjoblom[_2_] View Post
=AND(LEN(A1)=8,ISNUMBER(--(LEFT(A1,7))),CODE(RIGHT(A1,1))=65,CODE(RIGHT(A1, 1))<=90)


the above will not allow lower case at the end, if you want that the users
to be able to enter both a and A use


=AND(LEN(A1)=8,ISNUMBER(--(LEFT(A1,7))),CODE(UPPER(RIGHT(A1,1)))=65,CODE(UP PER(RIGHT(A1,1)))<=90)

--


Regards,


Peo Sjoblom

"dalymjl" wrote in message
...

dan dungan;716380 Wrote:
try placing the following formula in the "formula" section of the data
validation dialog box.

=AND(LEN(A1)=8,NOT(ISNUMBER(VALUE(RIGHT(A1,1)))))


Many thanks for you help. There is still a slight problem as that
validation would permit a letter or other character in the first 7
digits and I only want numbers in the first 7 places.

regards

MJD




--
dalymjl

Many thanks Peo.

That works brilliantly!
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
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
Cell Validation Richhall[_2_] Excel Worksheet Functions 2 January 2nd 08 10:34 AM
In Cell Validation List & Linked Cell VLOOKUP BEEZ Excel Discussion (Misc queries) 7 July 1st 07 07:17 PM
Data Validation: Store cell address instead of value in the cell? WillW Excel Discussion (Misc queries) 1 January 31st 07 02:22 AM
cell validation srinivas sarma Excel Worksheet Functions 1 July 1st 05 04:11 PM


All times are GMT +1. The time now is 12:08 AM.

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

About Us

"It's about Microsoft Excel"