Sub
Artikel_finden()
Dim
Suchbegriff
As
String
, MsgTxt
As
String
Suchbegriff = InputBox(
"Bitte Suchbegriff eingeben:"
)
If
StrPtr(Suchbegriff) = 0
Then
Exit
Sub
With
ActiveWorkbook.Worksheets(
"Tabelle1"
)
For
i = 1
To
.Cells(Rows.Count, 2).
End
(xlUp).Row
If
LCase(.Range(
"B"
& i))
Like
"*"
& LCase(Suchbegriff) &
"*"
Then
MsgTxt = MsgTxt & Chr(13) & .Range(
"A"
& i) & vbTab & .Range(
"B"
& i) & vbTab & .Range(
"F"
& i)
End
If
Next
End
With
If
MsgTxt =
""
Then
MsgBox
"Kein Eintrag zu "
""
& Suchbegriff &
""
" gefunden."
, vbExclamation,
"Suchen"
Else
MsgBox Mid(MsgTxt, 2, 10000), vbInformation,
"Suchen"
End
If
End
Sub