Page 2 of 2

Re: How to avoid a NAN - Not a Number response

Posted: Sun Jun 01, 2014 10:31 pm
by dazza the stag
HH

I think I might have just twigged what you were asking me to do. Effectively the only time the NAN response was given was when the interest rate box was left empty. As you pointed out some of the other boxes either had no effect or gave a "0" response anyway

Therefore I have added the line of code

if Field "MortgageRate1Input" = "" then Field "Mortgage1Result" = "0"

I think that then means that the annuity command can at least perform a calculation even though the result of that calculation isn't a proper one and then may Klaus' instruction about the Try command is completing the loop.

It seems to work but I will keep testing in various formats - thank you all