Question:
How to Create a Key Field in Excel?
?
2011-08-15 09:25:51 UTC
Hi,

Just opened a letting agents and for now, just using an Excel Doc to keep track of keys.
Each key we get from a landlord has a number put on its keyring and hung in the key cupboard (obviously we dont write the address of the key on the keyring).
So we know what key is for which address I set up an Excel Doc with Column A for Key Numbers, Column B is the house number, and Column C is the Street Name.
We had a mix up with the keys and someone put two keys labelled up as the same key number.

Is there anyway we can set Column A for Key Numbers as a Unique Field of some sort (or a warning flagging up saying we have a duplicate) so that we cant accidentally put two of the same numbers in there?

Thanks
Four answers:
Greywolf
2011-08-15 09:30:16 UTC
I was wrong - Excel can give an error if the value if not unique. See this webpage in PC Mag for details http://www.pcmag.com/article2/0,2817,2017565,00.asp
?
2017-01-19 13:40:04 UTC
1
Greg G
2011-08-15 10:52:45 UTC
Hi,



If you're using Excel 2007 or 2010, this is very easy.



Highlight Column A, and you can flag duplicates using Conditional Formatting (CF)



Click CF >> Highlight Cell Rules >> Duplicate Values



Select your format and you're done.



If all are unique, nothing happens, but as soon as you enter a number that already exists, both will be highlighted. This is less intrusive, but if you want to trigger an error alert and make it so a duplicate can't be entered in the first place, do this:



Select Cell A2, then go to the Data tab and click Data Validation.

On the Settings tab, under Allow, select Custom

under Formula, enter this:



=ISNA(VLOOKUP(A2,A$1:A1,1,FALSE))



Now on the Error Alert tab, make sure Show error alert is checked. You can enter a title like "Non unique key number" or whatever, and an error message like "You must enter a unique key number."



click OK, now with A2 still selected, drag-copy that down your range.



Now any time a key # that already exists in column A is entered, you will get a popup error alert and the cell will be in edit mode forcing the user to Retry (enter a different number), or Cancel (delete the entry.)
?
2016-10-19 04:42:09 UTC
Economics, that's getting the element the placement i'm handling actual massive annoying situations in my course yet i'm gaining expertise of a lot. Corruption, poverty, environmental matters, the way human beings think of of, terrorism, philosophy of life can all be manipulated by employing skill of financial structures. i actually choose faster or later i'm waiting to excel in this field and make the international a much better useful place.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...