A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
Let's say that the range is A1:A10
(change as yours)
step1
in cell A11 write:
=myaverage(A1:A10)
step2
ALT+F11 to open VB editor.
Insert > module and paste the code below on the right
Close VB editor.
.........................
Function myaverage(rng As Range)
t = 0
s = 0
For Each r In rng
If r.Value > 0 Then
t = t + 1
s = s + r.Value
End If
Next r
myaverage = Round(s / t, 2)' 2 decimal places, change as yours
End Function
cell A11 Format Percentage