Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook1= objExcel.Workbooks.Open("C:\")
Set objWorkbook2= objExcel.Workbooks.Open("C:\")
msgbox"The comparison started!",64, "Excel Comparison"
Set objWorksheet1= objWorkbook1.Worksheets(1)
Set objWorksheet2= objWorkbook2.Worksheets(1)
For Each cell In objWorksheet2.UsedRange
If cell.value <> objWorksheet1.Range(cell.Address).Value Then
cell.Interior.ColorIndex = 3
Else
cell.Interior.ColorIndex = 0
End If
Next
msgbox"The comparison has now complete!",64,"Excel Comparison"
set objExcel=nothing
Above is a basic script to compare to different excel workbooks, but the issue is with if data has been shifted down it will highlight the cells red even though the data hasnt changed.
What i need the above script to do is highlight what data has been added or removed.
Any help is appreciated.
Bookmarks