I have the question about calculation of Means, Max, Min in VBA. Since, I do not recommend to do it in excel as the time is varied. Sometime maybe 5 time, sometime maybe 30 times etc. The time depends on the Listcount. Therefore, I try to do the below VBA command to get the value.
Means
[VBA]
Dim a As Integer
Dim n As Integer
For x = 0 To ListBox1.ListCount ? 1
y = x * 38
.
.
a = Cells((y + 39), 5).Value
n = n + a
Next x
Range("B3").Value = Application.Sum(n) / ListBox1.ListCount[/VBA]
Max, Min (Use Max be example)
[VBA]
Dim x as Integer
Dim b as Integer
For x = 0 To ListBox1.ListCount ? 1
.
.
If b < Cells((y + 39), 5).Value then
b=Cells((y + 39), 5).Value
End if
Next x
Range("B4").Value = b[/VBA]
The concept like this, but it will show the error when run VBA.
Thanks