Option
Explicit
Public
Sub
kopieren()
Dim
raFund
As
Range, loStart
As
Long
, loEnde
As
Long
Application.ScreenUpdating =
False
With
Worksheets(
"Tabelle1"
)
Set
raFund = .Columns(
"F"
).Find(what:=
"Begriff1"
, LookIn:=xlValues, lookat:=xlWhole)
If
Not
raFund
Is
Nothing
Then
loStart = raFund.Row
Set
raFund = .Columns(
"F"
).Find(what:=
"Summe Begriff1"
, LookIn:=xlValues)
If
Not
raFund
Is
Nothing
Then
loEnde = raFund.Row
Else
MsgBox
"Fehler: Summenzeile nicht vorhanden."
End
If
Else
MsgBox
"Fehler: Begriff1 ist nicht vorhanden."
End
If
If
Not
loStart = 0
And
Not
loEnde = 0
Then
.Range(.Cells(loStart,
"A"
), .Cells(loEnde,
"T"
)).Copy
With
Worksheets(
"Tabelle2"
)
.Range(
"A"
& .Cells(.Rows.Count,
"A"
).
End
(xlUp).Offset(2).Row).PasteSpecial Paste:=xlPasteValues
End
With
End
If
End
With
Application.CutCopyMode =
False
Set
raFund =
Nothing
End
Sub