+ Reply to Thread
Results 1 to 7 of 7

How do I create a running total from all preceeding sheets?

  1. #1
    Registered User
    Join Date
    02-06-2015
    Location
    Exeter
    MS-Off Ver
    2013
    Posts
    8

    How do I create a running total from all preceeding sheets?

    First Post!!

    Hi everyone,
    I'm pretty new to vba and this is the first workbook where I have had to properly apply it so please bear with me. What I am trying to do is have a running total on my last sheet that will update when a command button is clicked. The issue I have is that I will be adding sheets each day to the workbook so cannot define at which point it would stop. I currently have this, however, it only works on one sheet (the first one) and doesn't allow me to use on the subsequent sheets:

    Please Login or Register  to view this content.
    The first sheet is called Load and my sheets currently go from load, load (1), Load (2) .... to Load (10) with all the collected data so far simplified in a sheet called Collated Data, where I would like my cumulative total to be. I would like to add cell B53 in all the load sheets and put the running total in cell N4 in the Collated Data sheet. Any help would be much appreciated as I'm still trying to get to grips with everything.

    Thank you in advance.
    Last edited by Tubes2015; 02-06-2015 at 06:36 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: How do I create a running total from all preceeding sheets?

    if your Collated Data Sheet is indeed the last one, a minor modification shall do:

    Please Login or Register  to view this content.
    please edit your post to comply with forum rules - namely Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    02-06-2015
    Location
    Exeter
    MS-Off Ver
    2013
    Posts
    8

    Re: How do I create a running total from all preceeding sheets?

    Thanks Kaper, I should have changed that now.

    I have tried your code but that only includes sheets Load and Load (1). I had modified it like this:

    Please Login or Register  to view this content.
    This then includes all ten load sheets I currently have. Is there any way of doing this so that I don't have to change it each time a sheet is added (i.e. changing this to 11 when I have 11 sheets)?

  4. #4
    Registered User
    Join Date
    02-06-2015
    Location
    Exeter
    MS-Off Ver
    2013
    Posts
    8

    Re: How do I create a running total from all preceeding sheets?

    Sorry I'm not sure if I am explaining this very well. The above code produces this formula in the right cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    which gives the running total that I am looking for. However, it only works up to sheet Load (10), is there a way this can increase every time I add another sheet rather than having to do it manually?

    Thanks in advance

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How do I create a running total from all preceeding sheets?

    Would this approach work for you?

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-06-2015
    Location
    Exeter
    MS-Off Ver
    2013
    Posts
    8

    Re: How do I create a running total from all preceeding sheets?

    That works perfectly, thank you very much John H. Davis much appreciated.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How do I create a running total from all preceeding sheets?

    You're welcome. Glad to help out and thanks for the feedback. Please mark this thread as solved.

+ 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. Running total from 2 different sheets
    By Pandas09 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2012, 05:52 PM
  2. How do I create a conditional running total on separate work sheets?
    By Poonz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-01-2007, 09:08 AM
  3. [SOLVED] How do I add totals up from different sheets? A running total.
    By Shawn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2005, 04:40 PM
  4. How do i create a running total in Excel?
    By Marcus1 in forum Excel General
    Replies: 2
    Last Post: 08-24-2005, 08:05 AM
  5. IF/THEN Statements to Create a Running Total
    By x9navysteve in forum Excel General
    Replies: 0
    Last Post: 03-16-2005, 11:46 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