distinct values in column

P

parthaemail

I like to format a column such that it allows only distinct values. fo
eg in the column A i have 10 numbers 1to 10 (A1 to A10) . if i ente
any value between 1 and 10 in A11 it should not allow. A11,A12.....et
should allow only distinct values. pls help me to do this

thanks in advanc
 
G

Guest

Data > Validation > Allow whole number > Between 1 and 10...add error
message if you wish, according to menu.

Vaya con Dios,
Chuck, CABGx3
 
P

parthaemail

hi

the below procedure is not working out, can you please check it out




Data > Validation > Allow whole number > Between 1 and 10...add error
message if you wish, according to menu.

Vaya con Dios,
Chuck, CABGx3
 
G

George Gee

Do you wish to enter UNIQUE values into column A?
If yes, then I think 'Data Validation' will not work.

A clumsy approach would be:
In another column, say B.
In B1 =IF(MAX(COUNTIF(A:A,A:A))>1,"Duplicate","")
Copy this formula down column b as far as you wish.

If you have '8' in A8, and enter '8' in say A12, then
A8 and A12 will display 'Duplicate', until you change one
of the '8' entries.

Any use?

George Gee


"parthaemail" <[email protected]>
wrote in message
 
G

George Gee

Sorry, slight mistake, should read:
B8 and B12 will display 'Duplicate'.....

George Gee
 
G

Guest

Sorry, you're right of course..........I mis-read the post. I see others
have since given you answers more to the point.

Vaya con Dios,
Chuck, CABGx3
 
G

George

Goto cell A then choose 'Data > Validation' from the menu

In the Allow: box choose 'custom'
In the formula: box type the following
=AND(A1>=1,A1<=10,MOD(A1,1)=0,FREQUENCY(A:A,A:A)<=1)
Enter an appropriate error message under the error alert tab
Then copy down to as many cells as needed

The mod function checks for whole numbers
and the frequency checks for any duplicates

hope this helps

George
 
P

parthaemail

hi

i have a different requirement now, column a should accept only
distinct values. if same number is entered this it should give an alert
in the msg box instead of displaying in the column as duplicate. i think
we have to use macros for this. please help me

thanks in advance
 
G

George

I posted an answer a few days ago but it seems to have not worked

Try this
Goto cell A then choose 'Data > Validation' from the menu

In the Allow: box choose 'custom'
In the formula: box type the following
=AND(MOD(A1,1)=0,FREQUENCY(A:A,A:A)<=1)
Enter an appropriate error message under the error alert tab
Then copy down to as many cells as needed

The mod function checks for whole numbers
and the frequency checks for any duplicates

hope this helps

George
 
M

Max

parthaemail said:
... column a should accept only distinct values.
if same number is entered this it should give an alert ..

This might work as well ..

Select col A
Data > Validation
Allow: Custom
Formula: =COUNTIF(A:A,A1)<2
Click OK

---
 
P

parthaemail

hi all

The below procedure is working fine. hearty thanks for valuable
information.



Goto cell A then choose 'Data > Validation' from the menu

In the Allow: box choose 'custom'
In the formula: box type the following
=AND(MOD(A1,1)=0,FREQUENCY(A:A,A:A)<=1)
Enter an appropriate error message under the error alert tab
Then copy down to as many cells as needed

The mod function checks for whole numbers
and the frequency checks for any duplicates
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top