Public
Sub
Test()
Dim
i
As
Long
, strSuche
As
String
, strErgebnis
As
String
strSuche =
"DeinSuchwort"
For
i = 5
To
Sheets.Count
With
Sheets(i)
If
.Cells(4,
"O"
) = strSuche
Then
If
strErgebnis =
""
Then
strErgebnis = Sheets(i).Name
Else
strErgebnis = strErgebnis & vbLf & Sheets(i).Name
End
If
End
If
End
With
Next
i
If
Not
strErgebnis = vbNullString
Then
strErgebnis = MsgBox(strSuche &
" ist in folgenden Blättern vorhanden:"
_
& vbLf & vbLf & strErgebnis, vbOKOnly,
"Ergebnis"
)
Else
MsgBox
"Der Suchabegriff "
& strSuche &
" konnte nicht gefunden werden."
End
If
End
Sub