I'm trying to get workbook 1, all sheets used range, if cell value = a cell value in column a of sheets"Final" in Wb2. if so color cell indexcolor 6. the following cod runs but no color change.
Code:
Sub color_matching_between_workbooks()
Dim sh As Worksheet
'Dim wb1 As Workbook
Dim wb2 As Workbook
Set wb2 = Workbooks.Open("C:\Users\Desktop\17057 System Line List.xlsm")
Dim finalrow As Integer
Dim i As Integer
finalrow = wb2.Sheets("Final").Range("A6000").End(xlUp).Row
For i = 2 To finalrow
For Each sh In ThisWorkbook.Worksheets
Dim cell As Range
For Each cell In sh.usedrange
If cell.Value = i Then
cell.Interior.ColorIndex = 4
End If
Next cell
Next sh
Next i
End Sub