Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
archiboy
 
Posts: n/a
Default input masks and validation

when entering data in a cell, i need to restrict users to enter the following
alphanumeric combination and nothing more.

"aa####a", where "a" is an alphabetic character (a-z) and "#" is a number
(0-9)

i cannot figure out the formula to use under the 'custom' section of Data -
Validation

pls help! thanks
  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

You might try this validation formula, where the validation cell is A1:

=AND(LEN(A1)=7,LEFT(A1,2)="aa",RIGHT(A1,1)="a",VAL UE(MID(A1,3,4)))

--
Jim
"archiboy" wrote in message
...
| when entering data in a cell, i need to restrict users to enter the
following
| alphanumeric combination and nothing more.
|
| "aa####a", where "a" is an alphabetic character (a-z) and "#" is a number
| (0-9)
|
| i cannot figure out the formula to use under the 'custom' section of
Data -
| Validation
|
| pls help! thanks


  #3   Report Post  
archiboy
 
Posts: n/a
Default

Thanks Jim. It works fine.
.....considering that "aa" limits the user to enter just the letters 'aa',
what should be the input mask should I need to allow any alphabetic
character, that is, a-z?

cheers

"Jim Rech" wrote:

You might try this validation formula, where the validation cell is A1:

=AND(LEN(A1)=7,LEFT(A1,2)="aa",RIGHT(A1,1)="a",VAL UE(MID(A1,3,4)))

--
Jim
"archiboy" wrote in message
...
| when entering data in a cell, i need to restrict users to enter the
following
| alphanumeric combination and nothing more.
|
| "aa####a", where "a" is an alphabetic character (a-z) and "#" is a number
| (0-9)
|
| i cannot figure out the formula to use under the 'custom' section of
Data -
| Validation
|
| pls help! thanks



  #4   Report Post  
Jim Rech
 
Posts: n/a
Default

This may do it:

=AND(LEN(A1)=7,CODE(LEFT(UPPER(A1),1))64,CODE(LEF T(UPPER(A1),1))<91,CODE(MID(UPPER(A1),2,1))64,COD E(MID(UPPER(A1),2,1))<91,RIGHT(A1,1)="a",VALUE(MID (A1,3,4)))

--
Jim
"archiboy" wrote in message
...
| Thanks Jim. It works fine.
| ....considering that "aa" limits the user to enter just the letters 'aa',
| what should be the input mask should I need to allow any alphabetic
| character, that is, a-z?
|
| cheers
|
| "Jim Rech" wrote:
|
| You might try this validation formula, where the validation cell is A1:
|
| =AND(LEN(A1)=7,LEFT(A1,2)="aa",RIGHT(A1,1)="a",VAL UE(MID(A1,3,4)))
|
| --
| Jim
| "archiboy" wrote in message
| ...
| | when entering data in a cell, i need to restrict users to enter the
| following
| | alphanumeric combination and nothing more.
| |
| | "aa####a", where "a" is an alphabetic character (a-z) and "#" is a
number
| | (0-9)
| |
| | i cannot figure out the formula to use under the 'custom' section of
| Data -
| | Validation
| |
| | pls help! thanks
|
|
|


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



All times are GMT +1. The time now is 03:41 PM.

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"