+ Reply to Thread
Results 1 to 8 of 8

Adding running total macro

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-19-2012
    Location
    Omaha, Nebraska USA
    MS-Off Ver
    Excel 2010
    Posts
    249

    Re: Adding running total macro

    Hi agzil,

    Here is some code that adds a formula in the cells in Column B to keep a running total, starting with Range B3. If you insert it outside of your "For Coin - Next Coin" loop, it should work.

    ' Add Running total to Column B
    For i = 3 To Cells(Rows.Count, 1).End(xlUp).Row
       Range("B" & i).Formula = "= A" & i & " + B" & (i - 1)
    Next i
    Hope that helps,

    Dan

  2. #2
    Registered User
    Join Date
    04-05-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    20

    Re: Adding running total macro

    Quote Originally Posted by djbomaha View Post
    Hi agzil,

    Here is some code that adds a formula in the cells in Column B to keep a running total, starting with Range B3. If you insert it outside of your "For Coin - Next Coin" loop, it should work.

    ' Add Running total to Column B
    For i = 3 To Cells(Rows.Count, 1).End(xlUp).Row
       Range("B" & i).Formula = "= A" & i & " + B" & (i - 1)
    Next i
    Hope that helps,

    Dan
    Dan! Thank you so much! I'm very new to all this and I've been stuck on this problem for quite some time now..So basically what you did is set the formula for the range. Can you please explain line three in more detail?
    Last edited by agzil; 04-15-2016 at 04:27 PM.

+ 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. Adding to a running total
    By RGSL in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-29-2013, 11:13 AM
  2. Adding to a running total from another workbook
    By cshort in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-06-2011, 04:01 PM
  3. Adding to a running total
    By Trussy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2011, 05:43 PM
  4. [SOLVED] Adding numbers to a running total
    By [email protected] in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 06:05 PM
  5. [SOLVED] Adding numbers to a running total
    By Elizabeth Free in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  6. [SOLVED] Adding numbers to a running total
    By Elizabeth Free in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  7. Adding numbers to a running total
    By Elizabeth Free in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  8. Adding numbers to a running total
    By Elizabeth Free in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

Tags for this Thread

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