I have 2 Worksheets ("Old" , "New" ).
I want to compare two columns of different worksheet
I want to highlight the cells on the column A of worksheet "New" the missing values from the column A of Worksheet "Old"
I am facing the following code:
Dim lastRow As Integer
Dim rng As Range
lastRow = Sheets("New").Range("A2:A10000").End(xlUp).Row
For i = 1 To lastRow
Set rng = Sheets("New").Range("A:A").Find(Sheets("Old").Cells(i, 1))
If rng Is Nothing Then
Sheets("New").Cells(i, 1).Interior.Color = RGB(250,0,0)
End If
Next
But is not working
I want to compare two columns of different worksheet
I want to highlight the cells on the column A of worksheet "New" the missing values from the column A of Worksheet "Old"
I am facing the following code:
Dim lastRow As Integer
Dim rng As Range
lastRow = Sheets("New").Range("A2:A10000").End(xlUp).Row
For i = 1 To lastRow
Set rng = Sheets("New").Range("A:A").Find(Sheets("Old").Cells(i, 1))
If rng Is Nothing Then
Sheets("New").Cells(i, 1).Interior.Color = RGB(250,0,0)
End If
Next
But is not working