Visual Basic-Quellcode
- Function BRXFollowMean(ByVal r As Range, ByVal i As Integer) As Double
- If i <= WorksheetFunction.CountA(r) Then
- Dim PartialRange As Range
- Set PartialRange = Range(r.Cells(1, 1).Offset(0, i - 1), r.Cells(1, r.Cells.Count))
- BRXFollowMean = WorksheetFunction.Average(PartialRange)
- Else
- BRXFollowMean = CVErr(xlErrValue)
- End If
- End Function
Gibt es eine Möglichkeit, statt dem Fehlerwert die Zelle einfach leer zu lassen. In etwa "BRXFollowMean = emptycell" ?