I am using ArcMap 10.2 and I want to find duplicates in 2 columns.

For example, Street_Name, HSN and ID are my columns.



As you can see in example I want to find same HSN on Same street.

How can I do that? Any ideas?


3 Answers 3


If you have a Standard or Advanced license you can use tool Find Identical:

Reports any records in a feature class or table that have identical values in a list of fields, and generates a table listing these identical records.

If you only have basic license you can use python:

columns_to_check=['FIELDNAME','TEXT'] #change names and add/remove columns to compare

all_records=[i for i in arcpy.da.SearchCursor("polygons123",columns_to_check)]
columns_to_check.append('OBJECTID') #change field name to match your id field
with arcpy.da.SearchCursor("polygons123",columns_to_check) as cursor:
    for row in cursor:
        if all_records.count(row[:-1])>1:
            print 'ObjectID {0} is a duplicate'.format(row[-1])


ObjectID 1 is a duplicate
ObjectID 2 is a duplicate

enter image description here


I am not sure what licence you got but if you have only basic you can do it like that.

  1. Create new column "Duplicates" as string.
  2. Run calculate field on Duplicates with expression "HSN" + ' ' + "Street_Name" + ' ' + "ID"
  3. Right click on duplicates column and Summarise without anything.
  4. Join table to your shape file using Duplicates field.

So the idea is to create unique key for your data and after that just summarise it.

  • This is a great solution, much simpler than I had used before. Glad I found this post.
    – ed.hank
    Commented Sep 17, 2020 at 13:35

You can add a new column with Add field and use Field calculator (maybe with VB or Python code) to put value in it depending on the values of the two columns. (For example put 1 if the two values are the same or 0 if the two values are different.)

Not the answer you're looking for? Browse other questions tagged or ask your own question.