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
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:
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.
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
A1 | A2 |
B1 | B2 |
C1 | C2 |
D1 | D2 |
E1 | E2 |
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 Text | Value from A1 | Value from C1 | Value from E1 | Summary column |
Existing Text | Value from A2 | Value from C2 | Value from E2 | Summary column |
Existing Text | Formula | Formula | Formula | Summary 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.