Function sum(n) As Double
sum = 0
For i = 1 To n
If i Mod 2 = 0 Then sum = sum + i * i
Next
End Function