wenn man noch die anzahl der zu berechnenten Felder wissen möchte, hier meine Lösung:
Option Explicit
Public Sub durchschnitt()
Dim sx As Integer
Dim kz As Integer
Dim gz As Integer
Dim dw As Integer
Dim az As Integer
kz = 100
dw = 0
gz = 0
az = 0
For sx = 1 To 6
If Cells(4, 2 + sx).Value < kz Then
kz = Cells(4, 2 + sx).Value
End If
Next
Cells(8, 2) = kz
For sx = 1 To 6
If Cells(4, 2 + sx).Value > gz Then
gz = Cells(4, 2 + sx).Value
End If
Next
Cells(9, 2) = gz
dw = dw + Cells(4, 1 + sx).Value
Cells(7, 2) = dw / 7
az = az + Cells(4, 1 + sx)
Cells(6, 2) = 7
Range("B6").Value = Application.WorksheetFunction.CountA(Range("4:4"))
End Sub
LG
Kurt
|