Have you run some numbers through the formula manually? Did you get good results? If so, then work on seeing why the program doesn't work.

Break the huge formula up into simple expressions and...