Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Field Validation for Length & Character Type

Hi,

I have a bunch of fields that I have validation on but there are two fields
that are so similar that I am having a problem trying to get them to be
uniquely validated.

both can only be 8 characters long but the first three characters are
letters and the last five are numbers. Range G5 needs to be validated to be
between ASA00000 & ASA99999. Range G30 needs to be validated to be between
AST00000 & AST99999. If I use the "Text Length" validation type then the
numbers can be swapped. I can't use the "Whole Number" validation because of
the first three characters. Is there a way to make a formula by using the
"Custom" validation that would work?

Thanks In Advance,
Rob
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Field Validation for Length & Character Type

With A1 the activecell, this would get you pretty close:

=and(len(a1)=8,left(a1,3)="asa",isnumber(-right(a1,5)))



Rob wrote:

Hi,

I have a bunch of fields that I have validation on but there are two fields
that are so similar that I am having a problem trying to get them to be
uniquely validated.

both can only be 8 characters long but the first three characters are
letters and the last five are numbers. Range G5 needs to be validated to be
between ASA00000 & ASA99999. Range G30 needs to be validated to be between
AST00000 & AST99999. If I use the "Text Length" validation type then the
numbers can be swapped. I can't use the "Whole Number" validation because of
the first three characters. Is there a way to make a formula by using the
"Custom" validation that would work?

Thanks In Advance,
Rob


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Field Validation for Length & Character Type

You gave me exactly the help I needed and it works
perfectly!!!!!!!!!!!!!!!!!!!!!

Thank You Verrrrry Much!
Rob

"Dave Peterson" wrote:

With A1 the activecell, this would get you pretty close:

=and(len(a1)=8,left(a1,3)="asa",isnumber(-right(a1,5)))



Rob wrote:

Hi,

I have a bunch of fields that I have validation on but there are two fields
that are so similar that I am having a problem trying to get them to be
uniquely validated.

both can only be 8 characters long but the first three characters are
letters and the last five are numbers. Range G5 needs to be validated to be
between ASA00000 & ASA99999. Range G30 needs to be validated to be between
AST00000 & AST99999. If I use the "Text Length" validation type then the
numbers can be swapped. I can't use the "Whole Number" validation because of
the first three characters. Is there a way to make a formula by using the
"Custom" validation that would work?

Thanks In Advance,
Rob


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Field Validation for Length & Character Type

Actually, it's only pretty close.

Excel can see a number in the last 5 characters of: ASA001E1

001E1
is in scientific notation for 1*(10^1) (= 10)

But it does catch lots of things.

Rob wrote:

You gave me exactly the help I needed and it works
perfectly!!!!!!!!!!!!!!!!!!!!!

Thank You Verrrrry Much!
Rob

"Dave Peterson" wrote:

With A1 the activecell, this would get you pretty close:

=and(len(a1)=8,left(a1,3)="asa",isnumber(-right(a1,5)))



Rob wrote:

Hi,

I have a bunch of fields that I have validation on but there are two fields
that are so similar that I am having a problem trying to get them to be
uniquely validated.

both can only be 8 characters long but the first three characters are
letters and the last five are numbers. Range G5 needs to be validated to be
between ASA00000 & ASA99999. Range G30 needs to be validated to be between
AST00000 & AST99999. If I use the "Text Length" validation type then the
numbers can be swapped. I can't use the "Whole Number" validation because of
the first three characters. Is there a way to make a formula by using the
"Custom" validation that would work?

Thanks In Advance,
Rob


--

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
Validation length, Range length I think I need to rephrase the question Excel Discussion (Misc queries) 5 September 17th 07 06:29 AM
character length in data forms phdbd Excel Discussion (Misc queries) 0 October 11th 06 06:15 PM
assigning character length in a cell Audrey Excel Discussion (Misc queries) 4 July 30th 06 04:40 PM
Find character when the length varies Rookie_User Excel Discussion (Misc queries) 3 April 12th 06 07:17 PM
length of character data Saravanan Excel Discussion (Misc queries) 2 December 19th 04 06:49 PM


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