<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Identifying Duplicates Arc 9.3 in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/identifying-duplicates-arc-9-3/m-p/234029#M13280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello and thanks for your help! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use the Field Calculator to identify duplicate field values. I found the below instructions/code online which works very well except that it flags single occurrences AND the first occurrence of multiple values with 0 and duplicates with 1. This is great except that I would like BOTH the original record and the duplicate to be marked with a 1, and all single occurrences to be flagged with a 0. Does anyone know how to alter the below instructions/code to make this happen? I tried and I cannot figure it out. Thank you so much! I really appreciate your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instructions/code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a new field. Set the type as long integer and accept the other defaults.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Right-click the field created in the step above and select Calculate Values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click the Advanced check box in the Field Calculator dialog box.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Paste the following code into the 'Pre-Logic VBA Script Code' text box: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Static d As Object &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Static i As Long &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim iDup As Integer &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim sField &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'======================== &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Replace the field name below &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sField = &lt;B&gt; &lt;/B&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'======================== &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If (i = 0) Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set d = CreateObject("Scripting.Dictionary") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If (d.Exists(CStr(sField))) Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;iDup = 1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;d.Add CStr(sField), 1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;iDup = 0 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i = i + 1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the code above, replace &lt;B&gt; with the name of the field containing duplicate records. &lt;/B&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The field name must be enclosed in square brackets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Type iDup in the lower text box of the Field Calculator dialog box.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jul 2013 18:51:16 GMT</pubDate>
    <dc:creator>DanaHerman</dc:creator>
    <dc:date>2013-07-09T18:51:16Z</dc:date>
    <item>
      <title>Identifying Duplicates Arc 9.3</title>
      <link>https://community.esri.com/t5/data-management-questions/identifying-duplicates-arc-9-3/m-p/234029#M13280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello and thanks for your help! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use the Field Calculator to identify duplicate field values. I found the below instructions/code online which works very well except that it flags single occurrences AND the first occurrence of multiple values with 0 and duplicates with 1. This is great except that I would like BOTH the original record and the duplicate to be marked with a 1, and all single occurrences to be flagged with a 0. Does anyone know how to alter the below instructions/code to make this happen? I tried and I cannot figure it out. Thank you so much! I really appreciate your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instructions/code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a new field. Set the type as long integer and accept the other defaults.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Right-click the field created in the step above and select Calculate Values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click the Advanced check box in the Field Calculator dialog box.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Paste the following code into the 'Pre-Logic VBA Script Code' text box: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Static d As Object &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Static i As Long &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim iDup As Integer &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim sField &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'======================== &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Replace the field name below &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sField = &lt;B&gt; &lt;/B&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'======================== &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If (i = 0) Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set d = CreateObject("Scripting.Dictionary") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If (d.Exists(CStr(sField))) Then &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;iDup = 1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;d.Add CStr(sField), 1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;iDup = 0 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i = i + 1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the code above, replace &lt;B&gt; with the name of the field containing duplicate records. &lt;/B&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The field name must be enclosed in square brackets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Type iDup in the lower text box of the Field Calculator dialog box.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 18:51:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/identifying-duplicates-arc-9-3/m-p/234029#M13280</guid>
      <dc:creator>DanaHerman</dc:creator>
      <dc:date>2013-07-09T18:51:16Z</dc:date>
    </item>
  </channel>
</rss>

