#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default Function Question

I wonder whether someone could help?

The following function when used inconjunction with Data Validation will
allow only a 9 digit number to be entered into a cell with no duplicate
values:

=AND(ISNUMBER(A1),LEN(A1)=10,COUNTIF($A$1:$A$100,A 1)<=1)

However, when I select a range of cells outside of the 'COUNTIF' range; for
example up to A200 the function still works. Why is this when the cell does
not fall within the range A1:A100?

Kind regards,

Simon.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Function Question

Because ISNUMBER, LEN and the COUNTIF criteria reference are all relative
references. If you applied that validation in A200 this is what the formula
looks like:

=AND(ISNUMBER(A200),LEN(A200)=10,COUNTIF($A$1:$A$1 00,A200)<=1)

Notice the COUNTIF range reference is still absolute to A1:A100.

--
Biff
Microsoft Excel MVP


"SiH23" wrote in message
...
I wonder whether someone could help?

The following function when used inconjunction with Data Validation will
allow only a 9 digit number to be entered into a cell with no duplicate
values:

=AND(ISNUMBER(A1),LEN(A1)=10,COUNTIF($A$1:$A$100,A 1)<=1)

However, when I select a range of cells outside of the 'COUNTIF' range;
for
example up to A200 the function still works. Why is this when the cell
does
not fall within the range A1:A100?

Kind regards,

Simon.



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
IF Function question. Excel beginner Excel Worksheet Functions 0 August 8th 07 10:36 PM
If Function Question?? Schwimms Excel Discussion (Misc queries) 3 July 31st 07 09:17 PM
FUNCTION QUESTION joseph robert Excel Discussion (Misc queries) 5 March 19th 07 04:11 PM
Function Question JustOneJawa Excel Worksheet Functions 2 June 8th 06 08:43 PM
Question on "Value" function Renny Bosch Excel Discussion (Misc queries) 6 December 31st 04 02:07 AM


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