title: Excel VBA: How to get COUNTIF function to not pick up text cells "1.1" and "1.10" as Duplicates?
body: <p>I am using the CountiF Function in Excel VBA to check for duplicates for an array of ID numbers that are as follows:</p>
  <ul>
  <li>1.0</li>
  <li>1.1</li>
  <li>1.2</li>
  <li>1.3</li>
  <li>1.4</li>
  <li>1.5</li>
  <li>1.6</li>
  <li>1.7</li>
  <li>1.8</li>
  <li>1.9</li>
  <li>1.10</li>
  <li>1.11</li>
  <li>...</li>
  </ul>
  <p>With the code that i am using, &quot;1.1&quot; and &quot;1.10&quot;, both formatted as text cells, are showing up as duplicates when i dont want them to.</p>
  <p>The following is my code and i would like to know what tweak if possible could resolve this issue?</p>
  <p>Thank you.</p>
  <pre><code>    'RESET ERROR IN HISTORY
          Workbooks(&quot;PERSONAL.xlsb&quot;).Sheets(&quot;History&quot;).Range(&quot;F2&quot;).Value = &quot;No Duplicates&quot;
      
      'SET STARTING CELL
          Cells(1, 3).Select
      
      'GET ACTIVE COLUMN
          Dim Col As Long
          Col = ActiveCell.Column
          
      'ESTABLISH END ROW
          Call Get_Last_Row
          Dim EndRow As Long
          EndRow = ActiveCell.Row
          Cells(1, Col).Select
          
      'RUN MAIN LOOP
          Dim Cell As Variant
          Dim Source As Range
          Set Source = Range(Cells(1, Col), Cells(EndRow, Col))
  
          For Each Cell In Source
          
              If Application.WorksheetFunction.CountIf(Source, Cell) &gt; 1 Then
                  Workbooks(&quot;PERSONAL.xlsb&quot;).Sheets(&quot;History&quot;).Range(&quot;F2&quot;).Value = &quot;Duplicates&quot;
                  Cell.Interior.ThemeColor = xlThemeColorAccent5
              End If
          
          Next
          
          If Workbooks(&quot;PERSONAL.xlsb&quot;).Sheets(&quot;History&quot;).Range(&quot;F2&quot;).Value = &quot;Duplicates&quot; Then
              MsgBox &quot;Duplicate Sheet Names Found&quot;
          End If
  </code></pre>