Ich bin sicher, es gibt eine einfachere Variante als meine - hat jemand eine Idee?
Grüsse
Patricia
With tbl_original
letzteSpalte = .Cells(1, 256).End(xlToLeft).Column
letzteZeile = .Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To letzteSpalte
If .Range("a" & i).Value = "Purch. organization" Then
.Cells(1, i).EntireColumn.Copy Destination:=tbl_copy.Cells(1, i)
End If
If .Range("a" & i).Value = "Supplier/Supplyinb Plant" Then
.Cells(1, i).EntireColumn.Copy Destination:=tbl_copy.Cells(1, i)
End If
If .Range("a" & i).Value = "Currency" Then
.Cells(1, i).EntireColumn.Copy Destination:=tbl_copy.Cells(1, i)
End If
If .Range("a" & i).Value = "Accrual estimate" Then
.Cells(1, i).EntireColumn.Copy Destination:=tbl_copy.Cells(1, i)
End If
If .Range("a" & i).Value = "G/L Account" Then
.Cells(1, i).EntireColumn.Copy Destination:=tbl_copy.Cells(1, i)
End If
If .Range("a" & i).Value = "Cost Center" Then
.Cells(1, i).EntireColumn.Copy Destination:=tbl_copy.Cells(1, i)
End If
If .Range("a" & i).Value = "Order" Then
.Cells(1, i).EntireColumn.Copy Destination:=tbl_copy.Cells(1, i)
End If
Next i
End With