Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Data Validation-Input Mask

I want to restrict entries to an Excel Cell to 6 characters, the first two
must be capitalized alpha characters and the following four can be any digit.
I know I can probably do this in Access, but how do i do it in Excel?
I have Office 2003
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default Data Validation-Input Mask

Data Validation will do (most of) this.

On "Allow" choose "Text Length" and set the minimum and maximum values.
Your user will only be allowed to enter text within the values set.

Why, "most of"? Because the user can try and type in as much as he wants;
only when he presses "Enter" will the restriction be invoked.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Smitty52" wrote in message
...
I want to restrict entries to an Excel Cell to 6 characters, the first two
must be capitalized alpha characters and the following four can be any
digit.
I know I can probably do this in Access, but how do i do it in Excel?
I have Office 2003



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default Data Validation-Input Mask

Data Validation will do (most of) this.

Data Validation will do all of this.

It ain't pretty:

=AND(LEN(A1)=6,CODE(LEFT(A1))=65,CODE(LEFT(A1))<= 90,CODE(MID(A1,2,1))=65,CODE(MID(A1,2,1))<=90,COU NT(--MID(A1,ROW(INDIRECT("3:6")),1))=4)

Length must be exactly 6 characters
The first 2 characters must be uppercase alpha characters A to Z
The next 4 characters must be numbers 0 to 9

Of course, data validation is easily defeated by copy/pasting or dragging.

Biff

"Andy Wiggins" <contact me via my website at www.BygSoftware.com wrote in
message ...
Data Validation will do (most of) this.

On "Allow" choose "Text Length" and set the minimum and maximum values.
Your user will only be allowed to enter text within the values set.

Why, "most of"? Because the user can try and type in as much as he wants;
only when he presses "Enter" will the restriction be invoked.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Smitty52" wrote in message
...
I want to restrict entries to an Excel Cell to 6 characters, the first two
must be capitalized alpha characters and the following four can be any
digit.
I know I can probably do this in Access, but how do i do it in Excel?
I have Office 2003





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Data Validation-Input Mask

This array formula didn't work for me as the data|validation formula. I could
use it in another cell, then use that cell as the basis for data|validation
though.

Since there's only 4 digits, maybe it's better to just bite the bullet and check
each of those characters to make sure that they're between 48 and 57
(inclusive)--just like you did with the uppercase letters?

Biff wrote:

Data Validation will do (most of) this.


Data Validation will do all of this.

It ain't pretty:

=AND(LEN(A1)=6,CODE(LEFT(A1))=65,CODE(LEFT(A1))<= 90,CODE(MID(A1,2,1))=65,CODE(MID(A1,2,1))<=90,COU NT(--MID(A1,ROW(INDIRECT("3:6")),1))=4)

Length must be exactly 6 characters
The first 2 characters must be uppercase alpha characters A to Z
The next 4 characters must be numbers 0 to 9

Of course, data validation is easily defeated by copy/pasting or dragging.

Biff

"Andy Wiggins" <contact me via my website at www.BygSoftware.com wrote in
message ...
Data Validation will do (most of) this.

On "Allow" choose "Text Length" and set the minimum and maximum values.
Your user will only be allowed to enter text within the values set.

Why, "most of"? Because the user can try and type in as much as he wants;
only when he presses "Enter" will the restriction be invoked.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Smitty52" wrote in message
...
I want to restrict entries to an Excel Cell to 6 characters, the first two
must be capitalized alpha characters and the following four can be any
digit.
I know I can probably do this in Access, but how do i do it in Excel?
I have Office 2003




--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default Data Validation-Input Mask

Works just fine for me.

If you get a message, "The formula currently...........do you wish to
continue?", just answer YES.

I know you don't do sample files but just in case......(you can trust me!)

Sample file: Validation.xls 13.5kb

http://cjoint.com/?iDdvEeT6lo

Now, after all is said and done, I'm having second thoughts as to whether or
not this is really what the OP wanted. They may want the validation but that
term, Input Mask, has a different meaning!!!

Biff

"Dave Peterson" wrote in message
...
This array formula didn't work for me as the data|validation formula. I
could
use it in another cell, then use that cell as the basis for
data|validation
though.

Since there's only 4 digits, maybe it's better to just bite the bullet and
check
each of those characters to make sure that they're between 48 and 57
(inclusive)--just like you did with the uppercase letters?

Biff wrote:

Data Validation will do (most of) this.


Data Validation will do all of this.

It ain't pretty:

=AND(LEN(A1)=6,CODE(LEFT(A1))=65,CODE(LEFT(A1))<= 90,CODE(MID(A1,2,1))=65,CODE(MID(A1,2,1))<=90,COU NT(--MID(A1,ROW(INDIRECT("3:6")),1))=4)

Length must be exactly 6 characters
The first 2 characters must be uppercase alpha characters A to Z
The next 4 characters must be numbers 0 to 9

Of course, data validation is easily defeated by copy/pasting or
dragging.

Biff

"Andy Wiggins" <contact me via my website at www.BygSoftware.com wrote
in
message ...
Data Validation will do (most of) this.

On "Allow" choose "Text Length" and set the minimum and maximum values.
Your user will only be allowed to enter text within the values set.

Why, "most of"? Because the user can try and type in as much as he
wants;
only when he presses "Enter" will the restriction be invoked.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Smitty52" wrote in message
...
I want to restrict entries to an Excel Cell to 6 characters, the first
two
must be capitalized alpha characters and the following four can be any
digit.
I know I can probably do this in Access, but how do i do it in Excel?
I have Office 2003



--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Data Validation-Input Mask

Oops.

Poor testing on my part!

I used lower case letters in my test. Doh!!!!



Biff wrote:

Works just fine for me.

If you get a message, "The formula currently...........do you wish to
continue?", just answer YES.

I know you don't do sample files but just in case......(you can trust me!)

Sample file: Validation.xls 13.5kb

http://cjoint.com/?iDdvEeT6lo

Now, after all is said and done, I'm having second thoughts as to whether or
not this is really what the OP wanted. They may want the validation but that
term, Input Mask, has a different meaning!!!

Biff

"Dave Peterson" wrote in message
...
This array formula didn't work for me as the data|validation formula. I
could
use it in another cell, then use that cell as the basis for
data|validation
though.

Since there's only 4 digits, maybe it's better to just bite the bullet and
check
each of those characters to make sure that they're between 48 and 57
(inclusive)--just like you did with the uppercase letters?

Biff wrote:

Data Validation will do (most of) this.

Data Validation will do all of this.

It ain't pretty:

=AND(LEN(A1)=6,CODE(LEFT(A1))=65,CODE(LEFT(A1))<= 90,CODE(MID(A1,2,1))=65,CODE(MID(A1,2,1))<=90,COU NT(--MID(A1,ROW(INDIRECT("3:6")),1))=4)

Length must be exactly 6 characters
The first 2 characters must be uppercase alpha characters A to Z
The next 4 characters must be numbers 0 to 9

Of course, data validation is easily defeated by copy/pasting or
dragging.

Biff

"Andy Wiggins" <contact me via my website at www.BygSoftware.com wrote
in
message ...
Data Validation will do (most of) this.

On "Allow" choose "Text Length" and set the minimum and maximum values.
Your user will only be allowed to enter text within the values set.

Why, "most of"? Because the user can try and type in as much as he
wants;
only when he presses "Enter" will the restriction be invoked.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Smitty52" wrote in message
...
I want to restrict entries to an Excel Cell to 6 characters, the first
two
must be capitalized alpha characters and the following four can be any
digit.
I know I can probably do this in Access, but how do i do it in Excel?
I have Office 2003



--

Dave Peterson


--

Dave Peterson
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
Data Valitaion Input message Sandy Excel Worksheet Functions 1 March 17th 06 03:51 AM
Input message on data validation field Russell-stanely Excel Discussion (Misc queries) 1 August 5th 05 02:41 AM
Data Validation - Location of input message box supergoat Excel Discussion (Misc queries) 5 April 25th 05 04:21 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM


All times are GMT +1. The time now is 09:00 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"