Function GetNum(Optional minNum As Long, Optional maxNum As Long)
Dim a As Boolean
a = True
If minNum = 0 Then minNum = 1
If maxNum = 0 Then maxNum = 2
GetNum = minNum
For i = minNum To maxNum
If Not a Then
GetNum = GetNum + (i + 1) / i
a = True
ElseIf a Then
GetNum = GetNum - (i + 1) / i
a = False
End If
Next
End Function