title: Fast merging duplicates in excel using VBA
body: <p>I created a macro in Excel to mergue duplicated rows:</p>
  
  <p>The idea is that if 2 rows or more have the same A B C columns, I mergue their D columns removing ABC duplicates.
  I need to do this, but checking more colums.</p>
  
  <p>My macro looks like this:</p>
  
  <pre><code>processingRow = 2
  Do Until Cells(processingRow, 1).Value = ""
      i = processingRow + 1
  
      Do Until Cells(i, 1).Value = ""
         If Cells(processingRow, 8) = Cells(i, 8) And _
            Cells(processingRow, 12) = Cells(i, 12) And _
            Cells(processingRow, 7) = Cells(i, 7) And _
            Cells(processingRow, 6) = Cells(i, 6) And _
            Cells(processingRow, 5) = Cells(i, 5) And _
            Cells(processingRow, 4) = Cells(i, 4) And _
            Cells(processingRow, 3) = Cells(i, 3) And _
            Cells(processingRow, 2) = Cells(i, 2) And _
            Cells(processingRow, 1) = Cells(i, 1) Then
                 If Cells(i, 14) &lt;&gt; "" Then
                      Cells(processingRow, 14) = Cells(processingRow, 14) &amp; "," &amp; Cells(i, 14)
                 End If
                 Rows(i).Delete
  
  
          End If
          i = i + 1
      Loop
  
      processingRow = processingRow + 1
  
  Loop
  </code></pre>
  
  <p>When running the macro with 500 rows, it takes a while, but its still reasonable. But I need to run this macro in a excel with more than 2500 rows, and it takes so much time that its not practical anymore.</p>
  
  <p>This is my first macro in excel using VBA, so I was wondering if there is a faster way to process rows/cells, since accessing them individually seems extremelly slow.</p>
  
  <p>Any ideas?</p>