Option
Explicit
Sub
suchen()
Dim
suche, firstAddress
Dim
Zaehler
As
Integer
, i
As
Integer
Dim
Ausgabe
As
String
Zaehler = 1
With
ThisWorkbook.Sheets(
"Tabelle1"
).UsedRange
Set
suche = .Find(
"Test"
, LookIn:=xlValues, LookAt:=xlWhole)
If
suche
Is
Nothing
Then
MsgBox
"Alles OK"
Else
firstAddress = suche.Address
Do
Zaehler = Zaehler + 1
If
Ausgabe <>
""
Then
Ausgabe = Ausgabe &
", "
& suche.Address
Else
Ausgabe = suche.Address
End
If
Set
suche = .FindNext(suche)
Loop
While
Not
suche
Is
Nothing
And
suche.Address <> firstAddress
MsgBox Ausgabe
End
If
End
With
End
Sub