How about 1 + 11 + 111 + 1111 + n

How about 1 + 11 + 111 + 1111 + n

Private Function Add(Byval n As Integer) As Long
Dim Sum As Long
Sum = Sum + n
If n > 1 Then
Sum = Sum + Add(n-1)
End if
Add = Sum
End Function