Gruppe
UDF
Problem
Die benutzerdefinierte Funktion in Spalte F soll einen Buchstabenindex für das Blatt liefern, in dem der Name aus Spalte A gefunden wird.
StandardModule: Modul1
Function GetGroup(sName As String) As String
Dim vRow As Variant
Dim iWks As Integer, iCounter As Integer
iCounter = Application.Caller.Parent.Index + 1
For iWks = iCounter To Worksheets.Count
vRow = Application.Match(sName, Worksheets(iWks).Columns(1), 0)
If Not IsError(vRow) Then
GetGroup = Chr(65 + iWks - iCounter)
Exit Function
End If
Next iWks
GetGroup = "Nicht gefunden"
End Function