#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Data Validation

HI,
I would like to limit input to all cells within a column to the following;
cannot be more then 9 digits with the first two always being "NJ" and the
last 7 numeric including 0.

Anything other then this should generate an error message.

Any help would be gratly appreciated.
--
Bruce
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Data Validation

Try this:

Select Col_A, with A1 as the active cell

<data<validation
Allow: Custom
Formula: =AND(COUNTIF(A1,"NJ???????"),INT(--RIGHT(A1,7))=--RIGHT(A1,7))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"BruceY" wrote:

HI,
I would like to limit input to all cells within a column to the following;
cannot be more then 9 digits with the first two always being "NJ" and the
last 7 numeric including 0.

Anything other then this should generate an error message.

Any help would be gratly appreciated.
--
Bruce

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Data Validation

One way:

Allow: Custom
Formula: =AND(LEFT(A1,2)="NJ",LEN(A1)<=11,ISNUMBER(--MID(A1,3,9)))

In article ,
BruceY wrote:

HI,
I would like to limit input to all cells within a column to the following;
cannot be more then 9 digits with the first two always being "NJ" and the
last 7 numeric including 0.

Anything other then this should generate an error message.

Any help would be gratly appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Data Validation


--
Bruce


"Ron Coderre" wrote:

Try this:

Select Col_A, with A1 as the active cell

<data<validation
Allow: Custom
Formula: =AND(COUNTIF(A1,"NJ???????"),INT(--RIGHT(A1,7))=--RIGHT(A1,7))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"BruceY" wrote:

HI,
I would like to limit input to all cells within a column to the following;
cannot be more then 9 digits with the first two always being "NJ" and the
last 7 numeric including 0.

Anything other then this should generate an error message.

Any help would be gratly appreciated.
--
Bruce

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Data Validation

Hi Ron,

This worked GREAT. Thanks so much for your help and for your quick response.
--
Bruce


"Ron Coderre" wrote:

Try this:

Select Col_A, with A1 as the active cell

<data<validation
Allow: Custom
Formula: =AND(COUNTIF(A1,"NJ???????"),INT(--RIGHT(A1,7))=--RIGHT(A1,7))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"BruceY" wrote:

HI,
I would like to limit input to all cells within a column to the following;
cannot be more then 9 digits with the first two always being "NJ" and the
last 7 numeric including 0.

Anything other then this should generate an error message.

Any help would be gratly appreciated.
--
Bruce



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Data Validation

You're very welcome, Bruce....(and thanks for the feedback!)

***********
Regards,
Ron

XL2002, WinXP


"BruceY" wrote:

Hi Ron,

This worked GREAT. Thanks so much for your help and for your quick response.
--
Bruce


"Ron Coderre" wrote:

Try this:

Select Col_A, with A1 as the active cell

<data<validation
Allow: Custom
Formula: =AND(COUNTIF(A1,"NJ???????"),INT(--RIGHT(A1,7))=--RIGHT(A1,7))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"BruceY" wrote:

HI,
I would like to limit input to all cells within a column to the following;
cannot be more then 9 digits with the first two always being "NJ" and the
last 7 numeric including 0.

Anything other then this should generate an error message.

Any help would be gratly appreciated.
--
Bruce

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 validation dakotasteve Excel Worksheet Functions 13 August 5th 06 01:28 AM
Macro question Chris Excel Worksheet Functions 12 July 7th 06 01:23 AM
Inputting data to one worksheet for it effect another daedalus1 Excel Discussion (Misc queries) 1 June 25th 06 04:39 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
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


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