Hi there,
I'm totally new to VBA and macros, so will need some deep level steps and code to perform the task. Thanks in advance for helping me out.
On sheet1 i've table1 which is populated by MS query refresh from oracle database. Usually user query data from the last month. On sheet2 Ive another table2 which contains data for all previous months. My problem is how to copy data from table1 and append it to table2 by user action (click of a button). The structure of both the table is same.
Example :-
Table1
[TABLE="width: 500"]
<tbody>[TR]
[TD]ColA
[/TD]
[TD]ColB
[/TD]
[TD]ColC
[/TD]
[/TR]
[TR]
[TD]T1A1
[/TD]
[TD]T1B1
[/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]T1A2
[/TD]
[TD]T1B2
[/TD]
[TD]200
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 192"]
<colgroup><col span="3"></colgroup><tbody>[TR]
[TD]Table2
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD]ColA
[/TD]
[TD]ColB
[/TD]
[TD]ColC
[/TD]
[/TR]
[TR]
[TD]T2A1
[/TD]
[TD]T2B1
[/TD]
[TD]1000
[/TD]
[/TR]
[TR]
[TD]T2A2
[/TD]
[TD]T2B2
[/TD]
[TD]2000
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]
After the copy/append it should look like :-
Table2
[TABLE="width: 500"]
<tbody>[TR]
[TD]ColA
[/TD]
[TD]ColB
[/TD]
[TD]ColC
[/TD]
[/TR]
[TR]
[TD]T2A1
[/TD]
[TD]T2B1
[/TD]
[TD]1000
[/TD]
[/TR]
[TR]
[TD]T2A2
[/TD]
[TD]T2B2
[/TD]
[TD]2000
[/TD]
[/TR]
[TR]
[TD]T1A1
[/TD]
[TD]T1B1
[/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]T1A2
[/TD]
[TD]T1B2
[/TD]
[TD]200
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
Note - there is pivot table based on table2 on sheet3
Thanks,
I'm totally new to VBA and macros, so will need some deep level steps and code to perform the task. Thanks in advance for helping me out.
On sheet1 i've table1 which is populated by MS query refresh from oracle database. Usually user query data from the last month. On sheet2 Ive another table2 which contains data for all previous months. My problem is how to copy data from table1 and append it to table2 by user action (click of a button). The structure of both the table is same.
Example :-
Table1
[TABLE="width: 500"]
<tbody>[TR]
[TD]ColA
[/TD]
[TD]ColB
[/TD]
[TD]ColC
[/TD]
[/TR]
[TR]
[TD]T1A1
[/TD]
[TD]T1B1
[/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]T1A2
[/TD]
[TD]T1B2
[/TD]
[TD]200
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 192"]
<colgroup><col span="3"></colgroup><tbody>[TR]
[TD]Table2
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD]ColA
[/TD]
[TD]ColB
[/TD]
[TD]ColC
[/TD]
[/TR]
[TR]
[TD]T2A1
[/TD]
[TD]T2B1
[/TD]
[TD]1000
[/TD]
[/TR]
[TR]
[TD]T2A2
[/TD]
[TD]T2B2
[/TD]
[TD]2000
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]
After the copy/append it should look like :-
Table2
[TABLE="width: 500"]
<tbody>[TR]
[TD]ColA
[/TD]
[TD]ColB
[/TD]
[TD]ColC
[/TD]
[/TR]
[TR]
[TD]T2A1
[/TD]
[TD]T2B1
[/TD]
[TD]1000
[/TD]
[/TR]
[TR]
[TD]T2A2
[/TD]
[TD]T2B2
[/TD]
[TD]2000
[/TD]
[/TR]
[TR]
[TD]T1A1
[/TD]
[TD]T1B1
[/TD]
[TD]100
[/TD]
[/TR]
[TR]
[TD]T1A2
[/TD]
[TD]T1B2
[/TD]
[TD]200
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
Note - there is pivot table based on table2 on sheet3
Thanks,