+ Reply to Thread
Results 1 to 8 of 8

Adding running total macro

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

    Adding running total macro

    Hello All,

    I want to modify this code to add a running total of column A on column B rows every time I add a value on column A. Cell B2 has already been set to a specific value. So I would like the code to start adding B2+A3 instead of A2+B2. I'm tucking this to a button.
    Screen Shot 2016-04-15 at 1.09.45 PM.png

    Please Login or Register  to view this content.
    Thank you!

  2. #2
    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.

    Please Login or Register  to view this content.
    Hope that helps,

    Dan

  3. #3
    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.

    Please Login or Register  to view this content.
    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.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,508

    Re: Adding running total macro

    No loop necessary.

    Please Login or Register  to view this content.
    Change the sheet reference as required.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


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

    Re: Adding running total macro

    Quote Originally Posted by TMS View Post
    No loop necessary.

    Please Login or Register  to view this content.
    Change the sheet reference as required.
    Thank you TMS, for the reply! I tried the code and its working properly but its adding from B2 and getting the header. How do you set it so the starting row is at 3?

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,508

    Re: Adding running total macro

    Please Login or Register  to view this content.

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

    Re: Adding running total macro

    I appreciate it so much Trevor!

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,508

    Re: Adding running total macro

    You're welcome. Thanks for the rep.

+ 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. 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. 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. [SOLVED] 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. [SOLVED] 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