Hello. New to this board. I found some code that compares two worksheets (sheet 2 with sheet 1) to determine if there are any differences in the rows. The code works perfect for highlighting the entire row. If there is a difference in the row on sheet 2, it is highlighted in red. Instead of highlighting the entire row, I would like to highlight the cell(s) where a change was found in each row.
Set Ws1 = Sheets("Sheet1")
Set Ws2 = Sheets("Sheet2")
Lc = Ws2.Cells(1, Columns.Count).End(xlToLeft).Column
With CreateObject("scripting.dictionary")
For Each cl In Ws1.Range("A2", Ws1.Range("A" & rows.Count).End(xlUp))
Vlu = Join(Application.index(cl.Resize(, Lc).Value, 1, 0), "|")
.Item(Vlu) = Empty
Next cl
For Each cl In Ws2.Range("A2", Ws2.Range("A" & rows.Count).End(xlUp))
Vlu = Join(Application.index(cl.Resize(, Lc).Value, 1, 0), "|")
If .exists(Vlu) = False Then cl.Resize(, Lc).Interior.color = RGB(250, 0, 0)
Next cl
End With
Set Ws1 = Sheets("Sheet1")
Set Ws2 = Sheets("Sheet2")
Lc = Ws2.Cells(1, Columns.Count).End(xlToLeft).Column
With CreateObject("scripting.dictionary")
For Each cl In Ws1.Range("A2", Ws1.Range("A" & rows.Count).End(xlUp))
Vlu = Join(Application.index(cl.Resize(, Lc).Value, 1, 0), "|")
.Item(Vlu) = Empty
Next cl
For Each cl In Ws2.Range("A2", Ws2.Range("A" & rows.Count).End(xlUp))
Vlu = Join(Application.index(cl.Resize(, Lc).Value, 1, 0), "|")
If .exists(Vlu) = False Then cl.Resize(, Lc).Interior.color = RGB(250, 0, 0)
Next cl
End With