title: Dynamically compare row, cell by cell, then go to next row and repeat (Large Range)
body: <p>I am trying to compare two large sets of data and highlight the cells that do not match one another. If a row has a cell that is different then copy and paste that row to a separate sheet.
  Also I need it to be dynamic because the data sets can change columns and/or rows.</p>
  
  <p>For Example:
  To compare B2 to E2, C2 to F2, highlight the differences and copy paste row to another sheet. Then move down to the next row and compare B3 to E3, C3 to F3 and keep looping till complete. </p>
  
  <p><img src="https://i.stack.imgur.com/J60to.jpg" alt="enter image description here"></p>
  
  <p>Currently, I have the following code, but its comparing one cell in the first range area to the second range area and then it moves to the next cell in the first  range area and repeats. I need it to compare each cell respectively. </p>
  
  <pre><code>Sub Compare()
  
  Dim rangeToUse As Range, singleArea As Range, cell1 As Range, cell2 As Range, I As Integer, J As Integer
  
  Set rangeToUse = Selection
  Cells.Interior.ColorIndex = 0
  Cells.Borders.LineStyle = xlNone
  
  If Selection.Areas.Count &lt;= 1 Then
        MsgBox "Please select more than one area."
      Else
          rangeToUse.Interior.ColorIndex = 38
          For Each singleArea In rangeToUse.Areas
              singleArea.BorderAround ColorIndex:=1, Weight:=xlThin
          Next singleArea
          For I = 1 To rangeToUse.Areas.Count
              For J = I + 1 To rangeToUse.Areas.Count
                  For Each cell1 In rangeToUse.Areas(I)
                      For Each cell2 In rangeToUse.Areas(J)
                          If cell1.Value &lt;&gt; cell2.Value Then
                              cell1.Interior.ColorIndex = 0
                              cell2.Interior.ColorIndex = 0
                          End If
                      Next cell2
                  Next cell1
              Next J
          Next I
  End If
  
  End Sub
  </code></pre>