I'm trying to create a VBA code that calculates the summation of 1/[i*(i+1)] for i=1 to infinity and shows a message box when the term causes a change less than 0.0001% (one millionth).
Thanks for the help!
-Chad
I'm trying to create a VBA code that calculates the summation of 1/[i*(i+1)] for i=1 to infinity and shows a message box when the term causes a change less than 0.0001% (one millionth).
Thanks for the help!
-Chad
Can you not solve this with Goalseek?
This can get you started, I'm not exactly sure what you are trying to accomplish.
![]()
Please Login or Register to view this content.
Last edited by mikeTRON; 02-06-2014 at 01:50 AM.
Please ensure you mark your thread as Solved once it is. Click here to see how.
If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.
I'm just trying to practice my For loops for the time being. Also, I apologize for not explaining more accurately. The code you provide looks correct except for the fact that each term (we'll call it test) should be added to the previous test to keep a cumulative sum. Then when cumulative sum i and cumulative sum j are less than one millionth % different, the code should stop. Thank you again for your time.
Here's what I have so far:
My CumSum isn't performing correctly because I don't know how to keep a running sum of each term.![]()
Please Login or Register to view this content.
You are correct, I didnt quite grasp your need, but I think I updated it appropriately above.
Thanks a ton Mike! I was on the verge, that was exactly what I was looking for!
On a side note, good to see another person from Dallas on here! Have a great night.
Sure. No problem. My VBA is not very developed so it's nice to be able to solve something for once haha.
Keep in mind it is ideal to use option explicit and declare every variable vs allowing everything to be a variant like I have done above.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks