Gruppe
Funktion
Bereich
RANG
Thema
Errechnung von Schulnoten anhand einer Punktetabelle
Problem
Wie kann ich die Schulnote im Verhältnis zur maximal erreichbaren Punktezahl festlegen?
Lösung
Nur anhand einer Beipspielarbeitsmappe darstellbar.
StandardModule: basMain
Function Temperatur(dat As Date, rng As Range)
Dim rngAct As Range
Dim iStart As Integer, iEnd As Integer
For Each rngAct In rng.Cells
If rngAct = dat Then
iStart = rngAct.Row
iEnd = iStart
Exit For
End If
Next rngAct
Do
iEnd = iEnd + 1
Loop While rng.Cells(iEnd - 1, 1) = rng.Cells(iEnd, 1)
Temperatur = WorksheetFunction.Max( _
rng.Range(rng.Cells(iStart, 3), rng.Cells(iEnd, 3)))
End Function