Gruppe
UDF
Problem
Aus einem Notenspiegel soll die am häufigsten vergebene Note ermittelt werden.
StandardModule: basMain
Function MultiMax(rng As Range) As String
Dim iRow As Integer
Dim sMax As String
With rng
For iRow = 1 To .Cells.Count
If .Cells(iRow) = WorksheetFunction.Max(rng) Then
sMax = sMax & .Cells(iRow).Offset(0, -1) & ","
End If
Next iRow
End With
MultiMax = Left(sMax, Len(sMax) - 1)
End Function