Private
Function
SSVERWEIS( _
ByRef
Suchkriterium
As
String
, _
ByVal
Matrix
As
Range, _
ByVal
Spaltenindex%)
Application.Volatile
Dim
sRange
As
Variant
Dim
ws
As
Worksheet
Dim
sResult
As
Variant
Dim
R&, C%
For
Each
ws
In
Worksheets
If
ws.Index <> 1
Then
sRange = ws.Range(Matrix.Address)
For
R = 1
To
UBound(sRange)
For
C = 1
To
UBound(sRange, 2)
If
sRange(R, C) = Suchkriterium
Then
SSVERWEIS = sRange(R, Spaltenindex)
Exit
Function
End
If
Next
Next
End
If
Next
End
Function