Sub
Kunde()
Dim
Z
As
Integer
, S
As
Integer
Dim
Z2
As
Integer
Dim
Kunde_Alt
As
String
Dim
Land
As
String
Dim
Gef
As
Boolean
Z = 2
Z2 = 1
Do
Until
Cells(Z, 5).Value =
""
If
Cells(Z, 5).Value <> Kunde_Alt
Then
Z2 = Z2 + 1
Cells(Z2, 9).Value = Cells(Z, 5).Value
End
If
S = 10
Land = Cells(Z, 6).Value
Gef =
False
Do
Until
Cells(Z2, S).Value =
""
If
Cells(Z2, S).Value = Land
Then
Gef =
True
Exit
Do
End
If
S = S + 1
Loop
If
Gef =
False
Then
Cells(Z2, S).Value = Land
End
If
Kunde_Alt = Cells(Z, 5).Value
Z = Z + 1
Loop
End
Sub