AW: Werte übertragen
19.10.2016 10:41:43
Michael
Hallo!
Mit VBA zB so:
Sub a()
Dim Wb As Workbook: Set Wb = ThisWorkbook
Dim WsQ As Worksheet: Set WsQ = Wb.Worksheets("Tabelle1")
Dim WsZ As Worksheet: Set WsZ = Wb.Worksheets("Tabelle2")
Dim Ze, Sp
Dim FilSuch As Range, FilFind As Range, DatFind As Range, Z As Range
With WsQ
Set FilSuch = .Range(.Cells(2, 1), .Cells(.Rows.Count, 1).End(xlUp))
End With
With WsZ
Set FilFind = .Range(.Cells(1, 2), .Cells(.Rows.Count, 2).End(xlUp))
Set DatFind = .Range(.Cells(1, 4), .Cells(1, .Columns.Count).End(xlToLeft))
End With
For Each Z In FilSuch
Ze = Application.Match(Z.Value, FilFind, 0)
If Not IsError(Ze) Then
Sp = Application.Match(Z.Offset(, 1), DatFind, 0)
If Not IsError(Sp) Then
WsZ.Cells(Ze, Sp + 3).Value = Z.Offset(, 3).Value
End If
End If
Next Z
End Sub
LG
Michael