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
Last edited by Osing000; 10-07-2010 at 03:35 AM. Reason: Thank you king Sweep, for solving my problem
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.
You are the king.
Thank you!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks