Selecting values from one table to add and populate new column in another table

satheo

New Member
Joined
Jun 10, 2014
Messages
34
I'm fairly novice and trying to put together a budgeting table (let's call it Table 1), and want it to populate based on items I select from another table (Table 2).

So from Table 2 I'd like to be able to select (I suppose with some sort of form control like check boxes) several rows, and then based on those cells populate a new column in Table 1.

Example Table 2
A1A2
B1B2
C1C2
D1D2
E1E2

Let's say I want to select Rows A1, C1, and E1 - then I'd want Table 1 to add three columns to the middle of the table, like so:
Existing TextValue from A1Value from C1Value from E1Summary column
Existing TextValue from A2Value from C2Value from E2Summary column
Existing TextFormulaFormulaFormulaSummary column

There are quite a few rows from Table 2 I may want to select, perhaps up to 30 or so, and they'll be "random" each time. I was thinking of having a column of check boxes (corresponding to each row) along Table 2 and then a button "Populate" or something that adds those to that number of new columns in Table 1.

Right now all I have is this to add blank column to middle of Table 1:

Sub add_column()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim tbl As ListObject
Set tbl = ws.ListObjects("Table1")

tbl.ListColumns.Add(2).Name = "Placeholder"

End Sub

Any assistance or guidance would be appreciated, I may be thinking about doing this the wrong way too.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,214,952
Messages
6,122,454
Members
449,083
Latest member
Ava19

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