I'm looking for some help with my VBA script. I'm stuck on trying to figure out how to use the mod function.
This is what I've done so far:
Function AddOddNumbersWithMod(nr)
Dim i, sum
sum = 0
For i = (IF 1 MOD 2 = 0) to nr step 1
sum = sum + i <-- (calculate all the odd numbers before nr)
Next i
End Function
Any advice would be greatly appreciated.