+ Reply to Thread
Results 1 to 15 of 15

Macro to keep running totals across mutiple cells and multiple rows

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    asdf
    MS-Off Ver
    Excel 2010
    Posts
    8

    Macro to keep running totals across mutiple cells and multiple rows

    I need help with a macro that will keep a running total of scores. Basically the "total score" column will keep the running total of the "books" and "scores" cells in their respective rows.

    attached a screenshot, thanks for any help you can provide.

    haf.JPG

  2. #2
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Macro to keep running totals across mutiple cells and multiple rows

    would you need a macro for this? could you just use a formula that would update when you enter more data in.
    Regards,
    amotto

    If I helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Registered User
    Join Date
    08-27-2012
    Location
    asdf
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro to keep running totals across mutiple cells and multiple rows

    formula would work if i were able to clear the "books" and "scores" and still keep the total score.

  4. #4
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Macro to keep running totals across mutiple cells and multiple rows

    okay, then you would probably need a macro to do this. could you post your workbook or a sample workbook and i could work through it.

  5. #5
    Registered User
    Join Date
    08-27-2012
    Location
    asdf
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro to keep running totals across mutiple cells and multiple rows

    here it is. i did macros to clear the books and score cells and one to clear everything. also do you know a way to make the bar graph show from -1000 to 10,000 on the bottom bar no matter what the data is?

    Hand and Foot.xlsx

  6. #6
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Macro to keep running totals across mutiple cells and multiple rows

    the answer to your second problem is right click the bottom axis, and select format axis from there you should be able to figure it out. Does that work?
    Also could you put in some data in the file and your current formulas so i can see what exactly you are doing. right now i just have a blank worksheet and really no idea what you are trying to accomplish.

  7. #7
    Registered User
    Join Date
    08-27-2012
    Location
    asdf
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro to keep running totals across mutiple cells and multiple rows

    It is basic addition. the books cell will have a number like "500" and the score cell will have something like "300". Add those two to the total score cell for 800. Keep 800 in the total score cell for that row for the next round of cards then add 1000 to books and 450 to score for a total of 2250. Thats it should be easy right?

  8. #8
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Macro to keep running totals across mutiple cells and multiple rows

    this should do everything you want

    Please Login or Register  to view this content.
    Let me know how it goes
    Last edited by amotto11; 08-27-2012 at 09:36 PM.

  9. #9
    Registered User
    Join Date
    08-27-2012
    Location
    asdf
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro to keep running totals across mutiple cells and multiple rows

    just by looking at this code i am wondering why the "e21" cell is in there the D cells are merged with the E cells... same thing with g and h and j and k.

  10. #10
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Macro to keep running totals across mutiple cells and multiple rows

    I was just using the outer cells for reference, it should not matter which cells you choose since you are right, they are merged. This code worked nicely for me. You should try it out, and if you would like to make any adjustments go right ahead. I just wanted to draw something up for you that works.

  11. #11
    Registered User
    Join Date
    08-27-2012
    Location
    asdf
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro to keep running totals across mutiple cells and multiple rows

    ok, cool i will try it in a sec. do i just repeat hte code for each row that i need to do it on?

  12. #12
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Macro to keep running totals across mutiple cells and multiple rows

    the code should repeat to do fill in the entire worksheet that you gave me. It will not work for any other version of that workbook or any other workbook. the repeating section of the code is the while statement. In other words i believe that this should be the only macro that you should need on this workbook. Just put some numbers in and see how it works.

  13. #13
    Registered User
    Join Date
    08-27-2012
    Location
    asdf
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro to keep running totals across mutiple cells and multiple rows

    ok i got the code sort of working... however when i add numbers to scores and books... to all 6 of them it does not calculate and sometimes it calculates without hitting the button.

    i was adding 100 to the top row in score and books 200 to the second row and so on....

    Hand and Foot.xlsm
    Last edited by Gixxy; 08-27-2012 at 11:03 PM.

  14. #14
    Registered User
    Join Date
    08-27-2012
    Location
    asdf
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Macro to keep running totals across mutiple cells and multiple rows

    Honestly the clearing feature is just a bonus.... all i really need the macro to do is keep a running total in "total score" column with basic addition even if the books and score columns are cleared.

    One would think that you would be able to easily add two columns to a third and keep the running total in excel. Sorry to put you through so much.
    Last edited by Gixxy; 08-27-2012 at 11:32 PM.

  15. #15
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Macro to keep running totals across mutiple cells and multiple rows

    Is there anything else that i can do for you or anyone else can do? If not, please mark your thread solved. The steps are in my signature.

+ 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