Function Avge(ParamArray aValues() As Variant) As Double Dim varValue As Variant Dim dblTotal As Double For Each varValue In aValues dblTotal = dblTotal + varValue Next Avge = dblTotal / (UBound(aValues) + 1) End Function