+ Reply to Thread
Results 1 to 7 of 7

Summation of a formula

  1. #1
    Forum Contributor
    Join Date
    07-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    109

    Summation of a formula

    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

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Summation of a formula

    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.

  3. #3
    Forum Contributor
    Join Date
    07-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Summation of a formula

    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.

  4. #4
    Forum Contributor
    Join Date
    07-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Summation of a formula

    Here's what I have so far:
    Please Login or Register  to view this content.
    My CumSum isn't performing correctly because I don't know how to keep a running sum of each term.

  5. #5
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Summation of a formula

    You are correct, I didnt quite grasp your need, but I think I updated it appropriately above.

  6. #6
    Forum Contributor
    Join Date
    07-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Summation of a formula

    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.

  7. #7
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Summation of a formula

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Shortening a summation formula
    By T27 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-10-2014, 05:46 AM
  2. [SOLVED] summation formula
    By vt1921 in forum Excel General
    Replies: 3
    Last Post: 05-15-2012, 02:40 PM
  3. Relative Summation formula
    By nygwnj in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-21-2012, 10:07 PM
  4. Help with mathematic formula (summation)
    By rob_dav in forum Excel General
    Replies: 3
    Last Post: 03-12-2009, 01:15 PM
  5. Summation Formula Needed
    By addie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-18-2006, 04:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1