Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default data validation question

assuming the "value" will be entered in a cell with TEXT ("@"")
numberformat and neither element can be 0, try like

=AND(MID(A1,3,1)="-",-LEFT(A1,2)<1,-RIGHT(A1,7)<1)

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Paul James" wrote:

I would like to restrict data entry in a field that's used to collect
Tax ID or Employer ID numbers. The format for this field should be
two numbers, followed by a hyphen, followed by seven numbers. For
example:

12-1234567

One problem we've been experiencing is that some people have been
entering their social security numbers by mistake, and I'd like to put
a data validation rule in the cell that would require the format for
the Tax ID number as shown above, which would only take the two
digits, hyphen and seven digits.

Can anyone tell me what the rule should be?

Thanks in advance,

Paul




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
xls data validation question 2 t Excel Discussion (Misc queries) 2 March 12th 10 03:49 PM
Data Validation Question? mastermind Excel Worksheet Functions 2 December 22nd 06 05:26 PM
Data Validation Question dgraham Excel Discussion (Misc queries) 6 April 28th 06 01:03 PM
Data validation question Ted Rogers New Users to Excel 3 September 5th 05 12:26 AM
Data Validation Question Kenny Excel Programming 2 November 11th 03 05:28 AM


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