title: Trying to delete rows with cells that have same value as previous in VBA
body: <p>I am trying remove duplicate records using the A column, and I seem to have <em>some</em> success, but I have still found duplicates. Hoping someone will tell me what I can do to improve this.</p>
  
  <p>Thanks</p>
  
  <pre><code>Dim i       As Integer
  Dim value   As String
  
  i = 3
  Range("A" &amp; i).Select
  
  Do Until IsEmpty(ActiveCell)
      Range("A" &amp; i).Select
      value = ActiveCell.value
      Do Until IsEmpty(ActiveCell)
          If ActiveCell.value = value Then
              ActiveCell.EntireRow.Delete
          Else
              ActiveCell.Offset(1, 0).Select
          End If
      Loop
      i = i + 1
  Loop
  </code></pre>