+ Reply to Thread
Results 1 to 3 of 3

Need Help Summation of above rows using a loop

  1. #1
    Registered User
    Join Date
    07-15-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    2

    Need Help Summation of above rows using a loop

    I'm new to VBA and have been able to do what I needed until now. I wasn't sure how to word my question to easily explain my problem.

    I've attached a spreadsheet showing what I need to accomplish, without using VBA. Columns A and B will contain given numbers. Column a will range from 0 to X in increments of 1, column B will start at 0 and contain increasing values from there. Column C will perform a calculation on the values in A & B and with each subsequent row will need to perform a summation of previous rows. I'm assuming this needs some sort of loop.

    The equation would look something like this and the summation would continue until after a cell with value 0 was encountered.

    At any row = n

    Cn = (Bn - B(n-1))*(An - A(n-1)) + (B(n-1) - B(n-2))*(An - A(n-2)) + (B(n-2) - B(n-3))*(An - A(n-3)) . . . . .etc

    Hopefully I've explained it well enough, let me know if you need any clarification. Thanks in advance for any help you can provide!
    Attached Files Attached Files
    Last edited by Stinger85; 07-16-2011 at 12:17 AM. Reason: Solved

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Need Help Summation of above rows using a loop

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read this to understand why we ask you to do this.

  3. #3
    Registered User
    Join Date
    07-15-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Need Help Summation of above rows using a loop

    I apologize for that, I can definitely now understand why you don't want people cross-posting.

    Here is the link to the other post:

    http://www.mrexcel.com/forum/showthread.php?t=564714

    The question did get solved on the other forum, so I will update this thread as solved.

    Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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