title: Optimize macro for millions of calculations
body: <p>I'm matching ids on separate files, if a match happens the row on the source gets retrieved to the other file. I did a FOR statement for both files to scan each row, the source workbook has over 27000 rows and the other about 8000, if I understand right that is 216M+ calculations until the end of the loops. I've implemented <code>screenUpdating = False</code> and <code>xlCalculationManual</code>. But here am I, I've waited about 30 minutes and there is no sign of the code finishing (both VBA editor and Excel are "not responding").</p>
  
  <pre><code>For filaIndiceFuente = 2 To filaFuenteUltima
      criterioFuente = planillaFuente.Range("A" &amp; filaIndiceFuente).Value
      For filaIndiceDestino = 2 To filaDestinoUltima
          ' filaIndiceDestino = filaIndiceDestino + 1
          If planillaDestino.Range("A" &amp; filaIndiceDestino).Value = criterioFuente Then
  
          'CELLS GET TO THE OTHER FILE HERE
  
          End If
      Next filaIndiceDestino
  Next filaIndiceFuente
  </code></pre>
  
  <p>On test files I implemented the code and it runs almost instantly with positive results. If you could hint me other ways of improving my code I'll be thankful.</p>