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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,216,100
Messages
6,128,824
Members
449,470
Latest member
Subhash Chand

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