#1   Report Post  
JohnUK
 
Posts: n/a
Default Validation

Hi,
I need a way to stop anything from being entered into a cell other than 2
letters and 2 numbers eg:
AA12 (Alpha Alpha Numeric Numeric)
Is there a way using validation to do this?
Many thanks
John
  #2   Report Post  
Arvi Laanemets
 
Posts: n/a
Default Validation

Hi

P.e.
=AND(ISERROR(MID(A1,1,1)*1),ISERROR(MID(A1,2,1)*1) ,NOT(ISERROR(MID(A1,3,1)*1)),NOT(ISERROR(MID(A1,4, 1)*1)),LEN(A1)=4)
as validation rule


--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )



"JohnUK" wrote in message
...
Hi,
I need a way to stop anything from being entered into a cell other than 2
letters and 2 numbers eg:
AA12 (Alpha Alpha Numeric Numeric)
Is there a way using validation to do this?
Many thanks
John



  #3   Report Post  
JohnUK
 
Posts: n/a
Default Validation

Hi Arvi,
Thank you for your response.
I tried entering the formula into the Data Validation box on the Custom box,
is this correct, or is there another way? because as it is I cant get it to
work.
John

"Arvi Laanemets" wrote:

Hi

P.e.
=AND(ISERROR(MID(A1,1,1)*1),ISERROR(MID(A1,2,1)*1) ,NOT(ISERROR(MID(A1,3,1)*1)),NOT(ISERROR(MID(A1,4, 1)*1)),LEN(A1)=4)
as validation rule


--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )



"JohnUK" wrote in message
...
Hi,
I need a way to stop anything from being entered into a cell other than 2
letters and 2 numbers eg:
AA12 (Alpha Alpha Numeric Numeric)
Is there a way using validation to do this?
Many thanks
John




  #4   Report Post  
Arvi Laanemets
 
Posts: n/a
Default Validation

Hi

It works for me.

I selected cell A1, from Data menu Data Validation, selected Custom, and
entered the formula into Formula field (copied from formula toolbar, as I
tested it in some cell before)

Copy the formula into any cell except A1. The formula must return True, when
A1 is empty, or contains string in format "CC##", otherwise it always
returns False


--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )


"JohnUK" wrote in message
...
Hi Arvi,
Thank you for your response.
I tried entering the formula into the Data Validation box on the Custom
box,
is this correct, or is there another way? because as it is I cant get it
to
work.
John

"Arvi Laanemets" wrote:

Hi

P.e.
=AND(ISERROR(MID(A1,1,1)*1),ISERROR(MID(A1,2,1)*1) ,NOT(ISERROR(MID(A1,3,1)*1)),NOT(ISERROR(MID(A1,4, 1)*1)),LEN(A1)=4)
as validation rule


--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )



"JohnUK" wrote in message
...
Hi,
I need a way to stop anything from being entered into a cell other than
2
letters and 2 numbers eg:
AA12 (Alpha Alpha Numeric Numeric)
Is there a way using validation to do this?
Many thanks
John






  #5   Report Post  
JohnUK
 
Posts: n/a
Default Validation

Sorry Arvi,
Stupid of me - I didnt reference the cell I was working on.
Many thanks for your help It worked a treat.
John


"Arvi Laanemets" wrote:

Hi

P.e.
=AND(ISERROR(MID(A1,1,1)*1),ISERROR(MID(A1,2,1)*1) ,NOT(ISERROR(MID(A1,3,1)*1)),NOT(ISERROR(MID(A1,4, 1)*1)),LEN(A1)=4)
as validation rule


--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )



"JohnUK" wrote in message
...
Hi,
I need a way to stop anything from being entered into a cell other than 2
letters and 2 numbers eg:
AA12 (Alpha Alpha Numeric Numeric)
Is there a way using validation to do this?
Many thanks
John






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
TWO QUESTIONS: Validation & Spacing...PLEASE HELP Polina Excel Discussion (Misc queries) 3 July 29th 05 02:36 AM
data validation lists [email protected] Excel Discussion (Misc queries) 5 June 25th 05 07:44 PM
named range, data validation: list non-selected items, and new added items KR Excel Discussion (Misc queries) 1 June 24th 05 05:21 AM
Effect of Conditional Formatting, Data Validation Bill Sturdevant Excel Discussion (Misc queries) 1 January 25th 05 11:50 PM
Data Validation Window? Ken Excel Discussion (Misc queries) 1 January 11th 05 10:48 PM


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