Sub test()
Dim x As Double
Dim y As Double
Dim z As Double
Dim a As Double
Dim b As Double
Dim c As Double
Dim Answer As Double
x = 5
y = -2
z = 500
a = 6
b = -40
c = 3
Range("A1").Value = x
Range("A2").Value = y
Range("A3").Value = z
Range("A4").Value = a
Range("A5").Value = b
Range("A6").Value = c
Answer = Application.WorksheetFunction.AverageIf(Range("A1:A6"), ">" & 0)
Range("A1:A6").Clear
Debug.Print Answer
End Sub