Hello,
I have two sheets in a workbook. Column "A" is the model number and used for comparing in both sheets. I need to take sheet1 and compare to sheet2. All that match using column "A", I need to highlight in sheet2. I have been trying to modify the below macro, but no luck,
Sub greendifference()
Dim k As Long, e, a As Range, b As Range
Set a = Sheets("sheet1").Range("A1:ZZ760")
Set b = Sheets("sheet2").Range("A1:ZZ760")
For Each e In a
k = k + 1
If a(k) <> b(k) Then
a(k).Interior.Color = vbGreen
b(k).Interior.Color = vbGreen
End If
Next e
End Sub
Thanks JR
I have two sheets in a workbook. Column "A" is the model number and used for comparing in both sheets. I need to take sheet1 and compare to sheet2. All that match using column "A", I need to highlight in sheet2. I have been trying to modify the below macro, but no luck,
Sub greendifference()
Dim k As Long, e, a As Range, b As Range
Set a = Sheets("sheet1").Range("A1:ZZ760")
Set b = Sheets("sheet2").Range("A1:ZZ760")
For Each e In a
k = k + 1
If a(k) <> b(k) Then
a(k).Interior.Color = vbGreen
b(k).Interior.Color = vbGreen
End If
Next e
End Sub
Thanks JR