title: Compare two data sets in different sheet and print difference in other sheet using excel VBA?
body: <p>I have two data sets in two different sheet 
  Sheet1 is my Orginal ref and sheet2 is for comparison.
  sheet2 data should get compared by Sheet1 and print entire mismatched row of sheet2
   and highlight the cells which has mismatch data and this difference should be printed with column header in other
  specified Sheet and in specified range</p>
  
  <p>Also mismatch cell count should be updated in any sheet3 specified range cell</p>
  
  <p>Below is the tried code. Any help will be appreciated.</p>
  
  <pre><code>Sub CompareDataSet()
  Call compareSheets("Sheet1", "Sheet2")
  End Sub
  Sub compareSheets(Sheet1 As String, Sheet2 As String)
  Dim Cell As Range
  Dim CellMisMatch As Integer
  For Each Cell In ActiveWorkbook.Worksheets(Sheet1).UsedRange
  If Not Cell.Value = ActiveWorkbook.Worksheets(Sheet2).Cells(Cell.Row, Cell.Column).Value Then
  Let Worksheets("Sheet3").Cells(Cell.Row, Cell.Column) = Cell
  Cell.Interior.Color = vbYellow
  CellMisMatch = CellMisMatch + 1
  End If
  Next
  ThisWorkbook.Sheets("Sheet3").Cells(1, 1).Value = CellMisMatch
  End Sub
  </code></pre>