jlabrecque
New Member
- Joined
- Nov 7, 2018
- Messages
- 14
Hi,
I am having a slight problem with excel
I have two tables and two sheets.
Table 1 on Sheet 1
Table 2 on Sheet 2
The info on Table 1 feeds into Table 2 and is formatted for clients.
As I update table 1 it adds more rows at the bottom the rows do not get added onto table 2. So say the default table range is A1 to A5 any rows after A5 will not update onto the table on Sheet 2.
Can anyone provide some guidance on how to achieve this? I know you can go into the table on Sheet 2 and manually expand it by hitting tab in the bottom right cell, but I want it to update automatically. I also want to avoid having excess formulas as this can slow down/crash excel.
I have tried to VBA code below but it only works if you run the macro
Sub Test()
Dim the_sheet As Worksheet
Dim table_list_object As ListObject
Dim table_object_row As ListRow
Set the_sheet = Sheets("Table")
Set table_list_object = the_sheet.ListObjects(1)
Set table_object_row = table_list_object.ListRows.Add
table_object_row.Range(1, 1).Value = Sheets("A:A")
End Sub
Thank you for your ideas in advance
I am having a slight problem with excel
I have two tables and two sheets.
Table 1 on Sheet 1
Table 2 on Sheet 2
The info on Table 1 feeds into Table 2 and is formatted for clients.
As I update table 1 it adds more rows at the bottom the rows do not get added onto table 2. So say the default table range is A1 to A5 any rows after A5 will not update onto the table on Sheet 2.
Can anyone provide some guidance on how to achieve this? I know you can go into the table on Sheet 2 and manually expand it by hitting tab in the bottom right cell, but I want it to update automatically. I also want to avoid having excess formulas as this can slow down/crash excel.
I have tried to VBA code below but it only works if you run the macro
Sub Test()
Dim the_sheet As Worksheet
Dim table_list_object As ListObject
Dim table_object_row As ListRow
Set the_sheet = Sheets("Table")
Set table_list_object = the_sheet.ListObjects(1)
Set table_object_row = table_list_object.ListRows.Add
table_object_row.Range(1, 1).Value = Sheets("A:A")
End Sub
Thank you for your ideas in advance
Last edited: