Sub
Sverweis()
Dim
strZiel
As
String
Dim
strDatu
As
String
Dim
i
As
Integer
Dim
letzte_Zeile
As
Integer
Dim
strVerzeichn
As
String
Dim
varSpArr
As
Variant
Dim
intAnz
As
Integer
strZiel =
"C:Tets-Gesamtübersicht_Test Düsseldorf_"
strDatu = InputBox(prompt:=
"Bitte ein Datum im Format: JJJJ.MM.TT eingeben."
, Title:=
"Bitte Datum eingeben"
)
strVerzeichn = strZiel & strDatu &
".xlsx"
varSpArr = Array(2, 3, 25, 26, 27, 28, 31, 50, 51, 52, 53, 11, 12)
With
Workbooks.Open(strVerzeichn)
For
i = 2
To
letzte_Zeile
For
intAnz = 0
To
13
Range(
"B"
& i).Value = Application.WorksheetFunction.VLookup(Range(
"A"
& i), (.Worksheets(
"RVG-Verfahren"
).Range(
"A:BA"
)), varSpArr(intAnz),
False
)
Range(
"C"
& i).Value = Application.WorksheetFunction.VLookup(Range(
"A"
& i), (.Worksheets(
"RVG-Verfahren"
).Range(
"A:AA"
)), varSpArr(intAnz),
False
)
Next
intAnz
Next
i
End
With
End
Sub