In your code you use the / operator
Code:
i=(Last_Date - First_Date)/NumSets
whereas you should use the \ operator instead. This op. divides

ex.:
Code:
Dim intVal As Integer

intVal = 11 \ 4   ' Returns 2.
intVal = 9 \ 3   ' Returns 3. 
intVal = 10 \ 6   ' Returns 2.
intVal = 10 / 6 ' Returns 1.
try it, you'll like it