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

satheo

New Member
Joined
Jun 10, 2014
Messages
29
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.
 

Some videos you may like

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Watch MrExcel Video

Forum statistics

Threads
1,123,454
Messages
5,601,764
Members
414,471
Latest member
cchunyadi

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
Top