Greetings, Gurus.
In the code snippet below, I have previously set variables for "Ans" and "Ans1", and the user has already entered the values:
That part works fine in performing the necessary calculations. My problem is, when trying to enter a "statement" at the top of the page, near the end of the macro, all I am getting is "#NAME?" as a result. Here is the formula I am entering via VBA. Can anyone see the problem with this formula?
Also, how would I break this long formula up into two lines of VBA, just to make the code neater? I've seen " _" used, I thought, to break a single line of code into two lines, but it hasn't worked for me.
Thanks in advance for any help you can offer.
Hutch
Bookmarks