Hello,
I use the below to highlight similar between two sheets,
I would like to compare on more than two sheets, and the amount of sheets may vary. Can someone please help in allowing the code to expand over many sheets.
Thank you
EDIT
Also posted here Macro To Compare Sheets and Highlight Common
I use the below to highlight similar between two sheets,
VBA Code:
Sub GreenDifference()
Dim LR As Long, i As Long, x As Variant
LR = Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
x = Application.Match(Sheets("Sheet1").Range("A" & i).Value, Sheets("Sheet2").Columns("A"), 0)
If IsNumeric(x) Then
Sheets("Sheet1").Range("A" & i).Interior.Color = vbGreen
Sheets("Sheet2").Range("A" & x).Interior.Color = vbGreen
End If
Next i
End Sub
I would like to compare on more than two sheets, and the amount of sheets may vary. Can someone please help in allowing the code to expand over many sheets.
Thank you
EDIT
Also posted here Macro To Compare Sheets and Highlight Common
Last edited by a moderator: