Hello,
I have a workbook that I use regularly at my office, and on this workbook there is a certain variable that I'll call x. Currently the only way to find the value x is through a trial and error method in which I equate two different functions of x, f1(x) and f2(x), and plug in values for x until the two sides are equal, or y = f1(x)-f2(x)>=0 (or close enough.) I am trying to automate this process. I want to create a macro that starts with a value based on a known variable z, x0 = z+180 to be exact, and iterates the x value until y is as small as possible but > 0. Today has been my first exposure to VBA programming, and the few attempts I've made so far have gotten me caught up in infinite loops. Does anybody have an idea of how to do this, or any ideas for alternative ways to achieve the same goal? Thanks for any help!
Bookmarks