hello, I need to temper this code a little (code made by Fluff)
it compare values 1 to 1 from different sheets based on column A1.
In offset(0,5) sheet 1 and offset(0,16) sheet 2 it compares values and it works great but I need a little change.
everything should be 1:1 but if in Sheet 1 value that is currently checked is 14 and sheet 2 value is 12 it should be ignored (as correct - just like 1:1 match) any other result than this or 1:1 match should be noted (in this case by colour).
Can You make this work?
best regards!
W.
Code:
Dim Xl As Range
Dim RngX As Range
Dim ValU As String
With CreateObject("scripting.dictionary")
For Each Xl In Sheets(1).Range("A2", Sheets(1).Range("A" & Rows.count).End(xlUp))
ValU = Xl.Value & Xl.Offset(, 5).Value
If Not .Exists(ValU) Then .Add ValU, Nothing
Next Xl
For Each Xl In Sheets(2).Range("A2", Sheets(2).Range("A" & Rows.count).End(xlUp))
ValU = Xl.Value & Xl.Offset(, 16).Value
If Not .Exists(ValU) Then
Xl.Offset(, 0).Interior.Color = RGB(157, 157, 157)
Xl.Offset(, 1).Interior.Color = RGB(230, 130, 130)
End If
Next Xl
End With
it compare values 1 to 1 from different sheets based on column A1.
In offset(0,5) sheet 1 and offset(0,16) sheet 2 it compares values and it works great but I need a little change.
everything should be 1:1 but if in Sheet 1 value that is currently checked is 14 and sheet 2 value is 12 it should be ignored (as correct - just like 1:1 match) any other result than this or 1:1 match should be noted (in this case by colour).
Can You make this work?
best regards!
W.