Hi,
i have code that will highlight rows in workbook 1 if the values in column A of workbook 1 match the values in column A of workbook 2. Now i need to do the opposite and highlight any rows that have a unique value in column A of workbook 1 that is not found in column A of workbook 2.I need to do this using VBA. Below is the code i have which works for highlighting matching values. any help is greatly appreciated.
If Dir("U:\Premier\Macro Logs\Archives\" & facName & " " & Lmonth & ".xlsx") <> "" Then
Set arcWkbk = Workbooks.Open("U:\Premier\Macro Logs\Archives\" & facName & " " & Lmonth & ".xlsx")
Application.Visible = False
Set Prevrpt = arcWkbk.ActiveSheet
Set Currrpt = wkbk.ActiveSheet
For x = 1 To Currrpt.Cells(3, 1).End(xlDown).Row
For y = 1 To Prevrpt.Cells(3, 1).End(xlDown).Row
If Currrpt.Cells(x, 1) = Prevrpt.Cells(y, 1) And Currrpt.Cells(x, 11) <> Prevrpt.Cells(y, 11) Then
Currrpt.Cells(x, 9).Font.Color = -16776961
Currrpt.Cells(x, 9).Font.Bold = True
End If
Next y
Next x
arcWkbk.Close False
End If
Bookmarks