Set
objDic1 = CreateObject(
"scripting.dictionary"
)
Set
objDic2 = CreateObject(
"scripting.dictionary"
)
strCount1 = Cells(Rows.Count, 1).
End
(xlUp).Row
strCount2 = Cells(Rows.Count, 2).
End
(xlUp).Row
If
PfadName1 =
False
Then
Exit
Sub
Else
If
PfadName2 =
False
Then
Exit
Sub
Else
For
i = 1
To
strCount1
If
Not
objDic1.exists(Cells(i, 1).Value)
Then
objDic1.Add Cells(i, 1).Value, i
End
If
Next
For
x = 1
To
strCount2
If
Not
objDic2.exists(Cells(x, 2).Value)
Then
objDic2.Add Cells(x, 2).Value, x
End
If
Next
For
i = 1
To
strCount2
If
objDic1.exists(Cells(i, 2).Value)
Then
Cells(i, 2).Interior.ColorIndex = 4
Else
Cells(i, 2).Interior.ColorIndex = 3
End
If
Next
For
x = 1
To
strCount1
If
objDic2.exists(Cells(x, 1).Value)
Then
Cells(x, 1).Interior.ColorIndex = 4
Else
Cells(x, 1).Interior.ColorIndex = 3
End
If
Next
Debug.Print
"Spalte 1"
Debug.Print
""
For
Each
key
In
objDic1.Keys
Debug.Print key, objDic1(key)
Next
key
Debug.Print
""
Debug.Print
"Spalte 2"
Debug.Print
""
For
Each
key
In
objDic2.Keys
Debug.Print key, objDic2(key)
Next
key
End
If
End
If