Discussion Locked

Unique Entries in Excel Columns

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is there a way to force unique entries into Excel columns? In Access (or any other database for that matter), if you make a column of a table a primary key, you are prevented from inserting duplicate vaules into a table for that column. Is there anyway to accomplish this in Excel? I have seen ways to generate a list of the unique entries in a column and add them to another column. But I want to prevent the user from inserting a value if it already exists.

7 replies

by nicholasp

What you are trying to do is a database function. Excel, even though it can sometimes perform database functions, is not a database. Import your data into Access.

by don christner

It would help to know exactly what you want in your column, but I'll give you an example to start with.

If you simply want a unique sequential number, select the area that you what to control data entry into (your column). Then from the menu bar select DATA then VALIDATION. On the SETTINGS tab under allow, select CUSTOM. Then under formula enter =A2=A1+1 (assuming you have entered something in the first record) (you can enter any formula that parses to a True or False). Next under the INPUT MESSAGE tab, enter a title and a message to help the data entry person know what to enter.

Now, when you move into cell A2, the title and message will popup to tell the clerk what to enter and will not allow them to enter an incorrect number.

Of course, you will have to change this example to do whatever it is you want it to do. If this does not help, post more details and we can probably give better answers.

Don

This discussion is closed to new replies.