habe mit dem Makro Rekorder folgendes aufgenommen,
Sub suchen_finden()
'
Cells.Find(What:="100", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _
.Activate
Selection.EntireRow.Insert
Sheets("Tabelle1").Select
Range("B2").Select
Selection.Copy
Sheets("Tabelle2").Select
Range("B2").Select
ActiveSheet.Paste
Cells.Find(What:="110", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _
.Activate
Application.CutCopyMode = False
Selection.EntireRow.Insert
Sheets("Tabelle1").Select
Range("B3").Select
Selection.Copy
Sheets("Tabelle2").Select
Range("B8").Select
ActiveSheet.Paste
Cells.Find(What:="120", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _
.Activate
Application.CutCopyMode = False
Selection.EntireRow.Insert
Sheets("Tabelle1").Select
Range("B4").Select
Selection.Copy
Sheets("Tabelle2").Select
Range("B15").Select
ActiveSheet.Paste
End Sub
Wie kann man hieraus eine Schleife machen?
Werte für Cells.Find(What"?"..) stehen in Tabelle1 Spalte A
Die Überschrift aus Tabelle1 Spalte B soll in Tabelle 2 Spalte B an die Stelle wo die Zeile eingefügt wird.
Wäre schön wenn jemand einen Tip hätte.
Gruß
Peter