call filterTab(suchwort,
"Tabelle1"
, zieltabelle, begriff)
call filterTab(suchwort,
"Tabelle4"
, zieltabelle, begriff)
Sub
filterTab(suchwort
As
String
, copiertabelle
As
String
, zieltabelle
As
String
, begriff
As
String
)
dim lrow&
With
Worksheets(copiertabelle)
.AutoFilterMode =
False
with .Range(
"A1:D20"
)
lrow =Sheets(zieltabelle).Cells(Rows.Count, 1).
End
(xlUp).Row
lrow = iif(lrow = 1 and =Sheets(zieltabelle).Cells(1,1)=
""
,1,lrow +1)
.AutoFilter Field:=2, Criteria1:=
"*"
&suchwort&
"*"
.SpecialCells(xlCellTypeVisible).Copy Destination:=Sheets(zieltabelle).Cells(lrow, 1)
end with
End
With