My code in Excel-VBA is the following:
Public Function ci(p As Double) As Long
Dim i As Long
i = 0
ci = 0
Do Until (p + i * 1.725) Mod 20 = 0
i = i + 1
ci = i
Loop
End Function
So, the results were not real because this kind of forums let me know that variable type double is not exact. Therefore, the operator mod didn´t give reliable results too. I hope you can give how to deal with this issue and to work with the right kind of variable.