Do you want to know which employee names are not manager names?
Sub CompareLists()
Application.ScreenUpdating = False
Dim Rng As Range, RngList As Object
Set RngList = CreateObject("Scripting.Dictionary")
For Each Rng In Range("B1", Range("B" & Rows.Count).End(xlUp))
If Not RngList.Exists(Rng.Value) Then
RngList.Add Rng.Value, Nothing
End If
Next Rng
For Each Rng In Range("A1", Range("A" & Rows.Count).End(xlUp))
If Not RngList.Exists(Rng.Value) Then
Rng.Font.ColorIndex = 3
End If
Next Rng
RngList.RemoveAll
Application.ScreenUpdating = True
End Sub
I'm assuming that the Employee Name is in column A and the manager is on column B. This will highlight in red every employee who is not a manager.
Code:Sub CompareLists() Application.ScreenUpdating = False Dim Rng As Range, RngList As Object Set RngList = CreateObject("Scripting.Dictionary") For Each Rng In Range("B1", Range("B" & Rows.Count).End(xlUp)) If Not RngList.Exists(Rng.Value) Then RngList.Add Rng.Value, Nothing End If Next Rng For Each Rng In Range("A1", Range("A" & Rows.Count).End(xlUp)) If Not RngList.Exists(Rng.Value) Then Rng.Font.ColorIndex = 3 End If Next Rng RngList.RemoveAll Application.ScreenUpdating = True End Sub
Can there be more than 2 manager names for any one employee ID?