Dynamically move data from a table to another in excel vba

superman_akrt

New Member
Joined
May 5, 2015
Messages
7
Hi,

I have two tables in two different worksheets under the same workbook.

Table 1 & Table 2

  1. I want to create a function that will take table 1 & table 2 as parameters.
  2. Copy cells from table 1 to table 2 but we have have 2 questions:
Which column to update and which row to update to know the proper cell.
Which column should be based on the naming of the column example:
Table 1.Column 1 will be Table 2.Column 1 So detecting the column to update will be based on matching column names.
Which row should be last row in table 2 + 1.
So whatever the number of columns is there, function should search and match in table 2 based on column name.
I don't need exact syntax, I just want to know the how would the logic go.

Thanks,
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top