+ Reply to Thread
Results 1 to 3 of 3

Thread: Multiple tables automatically sum up in total sheet?

  1. #1
    Registered User
    Join Date
    10-28-2009
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    5

    Multiple tables automatically sum up in total sheet?

    Hi all,

    Just a quick question, hope you can help me with this one. I am trying to use a Macro to add two tables together on one total page. The structure of the tables are the same, however the length differs.

    I have added an example Excel in this post. On sheet 1, you'll find the first tabel and on sheet 2, suprisingly, you'll find the second table.

    On the third sheet, the total are added. I would like to press the button for it to work.

    When I am doing it now, I always miss the last row of the first table. Could anyone help me out with this macro?

    Thanks in advance!
    Gertjan
    Attached Files Attached Files
    Last edited by Osing000; 10-07-2010 at 03:35 AM. Reason: Thank you king Sweep, for solving my problem

  2. #2
    Forum Guru sweep's Avatar
    Join Date
    04-03-2007
    Location
    Location: Location:
    MS-Off Ver
    3.0
    Posts
    2,472

    Re: Multiple tables automatically sum up in total sheet?

    Hi,

    Does this get you any closer

    Sub Populate()
        Range(Range("B3"), Range("B3").End(xlToRight).End(xlDown)).ClearContents
        
        Sheets("Table 1").Select
        Range(Range("B3"), Range("B3").End(xlToRight).End(xlDown)).Copy
        
        Sheets("Total").Select
        Range("B3").Select
        ActiveSheet.Paste
                
        Sheets("Table 2").Select
        Range(Range("B3"), Range("B3").End(xlToRight).End(xlDown)).Copy
        
        Sheets("Total").Select
        Range("B3").End(xlDown).Offset(1, 0).Select
        ActiveSheet.Paste
        application.CutCopyMode = false
    End Sub
    Please disregard anything in the above post. It may well have been edited without my consent, as has been the case with several posts and threads recently.

  3. #3
    Registered User
    Join Date
    10-28-2009
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Multiple tables automatically sum up in total sheet?

    You are the king.

    Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0