Results 1 to 7 of 7

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

Threaded View

  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:

    Private Sub CommandButton3_Click()
    
      Dim WS1_Name As String
        Dim WSLast_Name As String
    
        WS1_Name = Worksheets("Load").Name
        WSLast_Name = Worksheets(Worksheets.Count).Name
    
        Worksheets("Collated Data").Range("N4").FormulaR1C1 = "=SUM(" & WS1_Name & ":" & WSLast_Name & "!R[49]C[-12])"
        
    End Sub
    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.

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