FOLGENDES FUNKTIONIERT:
For
i = 2
To
lr
pasterange =
"H"
& i
If
Worksheets(
"upload"
).Cells(i, 4) =
""
Then
GoTo
line1
profitcenter = Application.WorksheetFunction.VLookup(Worksheets(
"Upload"
).Cells(i, 4), Worksheets(
"PrftCntrAbleitung"
).Range(
"A2:B5535"
), 2, 0)
Worksheets(
"Upload"
).Range(pasterange).Value = profitcenter
line1:
Next
i
<strong>FOLGENDES FUNKTIONIERT NICHT:</strong>
quelle.Range(
"P:P"
).Copy
Worksheets(
"upload"
).Range(
"L:L"
).PasteSpecial (xlPasteValues)
For
i = 1634
To
lr
pasterange =
"L"
& i
If
Worksheets(
"KundenMapping"
).Cells(i, 16) =
""
Then
GoTo
line2
k<em>undenNR = Application.WorksheetFunction.VLookup(Worksheets(
"Upload"
).Cells(i, 16), _
Worksheets(
"KundenMapping"
).Range(
"A2:B4000"
), 2, 0) </em> <---- HIER KOMMT DER RUNTIME ERROR
Worksheets(
"Upload"
).Range(pasterange).Value = kundenNR