Sub
sortieren()
Dim
i
As
Integer
Dim
j
As
Integer
Dim
z
As
Integer
Dim
x
As
String
Dim
x2
As
String
Dim
y
As
String
Dim
y2
As
String
i = 1
j = 1
z = 1
x = Sheets(
"Tabelle1"
).Cells(i, 1)
x2 = Sheets(
"Tabelle2"
).Cells(j, 1)
Do
While
x <>
""
x = Sheets(
"Tabelle1"
).Cells(i, 1)
y = Sheets(
"Tabelle1"
).Cells(i, 2)
Do
While
x2 <>
""
x2 = Sheets(
"Tabelle2"
).Cells(j, 1)
y2 = Sheets(
"Tabelle2"
).Cells(j, 2)
If
x = x2
And
y = y2
Then
Sheets(
"Tabelle1"
).Cells(z, 4) = x
Sheets(
"Tabelle1"
).Cells(z, 5) = y
z = z + 1
Exit
Do
End
If
j = j + 1
Loop
j = 1
i = i + 1
Loop
End
Sub