title: Compare Color and Format of 2 files in VBA
body: <p>I'm currently working on a macro to compare 2 big files that should be identical.
  The point of the macro is to find if their is differences concening the color, the formula or the format between the files. I've made one that compare cell by cell but the run takes 5 hours...</p>
  
  <p>I've tried the use of variant but I only managed to compare the value.</p>
  
  <p>Here is the part of the code were I would like to add the Interior.ColorIndex and .Format:</p>
  
  <pre><code>For colonne = 1 To dercolonne
  For ligne = 1 To derligne
  Windows(WB_1).Activate
  Sheets(wsname).Activate
  MontabA = Range(Cells(1, 1), Cells(derligne, dercolonne)).FormulaR1C1Local
  contenue1 = MontabA(ligne, colonne)
  If Err &gt; 0 Then
  erreur = erreur &amp; sh.Name &amp; " " &amp; Cells(ligne, colonne).Address &amp; ": erreur cellule" &amp; vbCrLf
  End If
  Windows(WB_2).Activate
  Sheets(wsname).Activate
  MontabB = Range(Cells(1, 1), Cells(derligne, dercolonne)).FormulaR1C1Local
  contenue2 = MontabB(ligne, colonne)
  If contenue1 &lt;&gt; contenue2 Then
  erreur = erreur &amp; sh.Name &amp; ": " &amp; Cells(derligne, dercolonne).Address &amp; vbCrLf
  Else
  End If
  Next ligne
  Next colonne
  </code></pre>
  
  <p>Many thanks,</p>
  
  <p>Quentin</p>