Nitesh Khot
Member
hi i have two different files with same sheet name and i want to compare both files sheets and highlight not matching valu..
below code i used but error throw...
below code i used but error throw...
Code:
Public Sub Find_Highlight_Duplicates()
Dim CompareRange1, CompareRange2, A, B As Variant
Dim wb, wb1 As Workbooks
Set CompareRange1 = wb("Insurance 23-04-16.xlsx").Sheets("Claim MIS").Range("A3:BT471")
Set CompareRange2 = wb1("Insurance 19-04-16 (2).xlsx").Sheets("Claim MIS").Range("A3:BT475")
For Each A In CompareRange1
For Each B In CompareRange2
If A.Value = B.Value Then
Else
A.Font.Color = RGB(255, 0, 0)
End If
Next B
Next A
End Sub