can i prevent duplications in cells

J

Jackie

I am creating lists in Excel and I don't want information to be duplicated,
can I use a forlmula to prevent this?
A bit like a primary key in databases
 
B

Biff

Hi!

You can use Data Validation for this.

Assume the range in question is A1:A5.

Select that range, A1:A5.
Goto Data>Validation
Allow: Custom
Formula: =COUNTIF(A$1:A$5,A1)<2

You can create your own custom error message if you want by clicking on the
Error Alert tab.

Biff
 
J

Jackie

Thanks - I'll try this, but while I am on the subject of spreadsheets and
formulas - can you show me the the idiots way of creating an auto complete.
A lot of my records have a unique reference number, but may contain the same
sort of information similar to another record
ie name (unique), house number (seperate cell)
Street - its here where I could do with the town, county, region auto
filling in

Many thanks
Jackie
 
J

Jackie

Thanks - I'll try this, but while I am on the subject of spreadsheets and
formulas - can you show me the the idiots way of creating an auto complete.
A lot of my records have a unique reference number, but may contain the same
sort of information similar to another record
ie name (unique), house number (seperate cell)
Street - its here where I could do with the town, county, region auto
filling in

Many thanks
Jackie
 
G

Gord Dibben

Jackie

Perhaps a VLOOKUP table would fill your needs.

Check out Help on this Function.


Gord Dibben MS Excel MVP
 
Top