Forum Discussion
Gebhi
Mar 10, 2021Copper Contributor
How would you make an input table?
Hello! I am working on a problem where I need to put a line of data from an input table to put at the end of another table, with supposed infinite length, and would then delete the table input from before. Would I need to use a button or something in the developer tab? The data table I am using is quite bulky and I would like to streamline it so I don't have to scroll all the way down. I am still learning Excel and this problem stumped me. Here are a few stages for what I am looking for:
Appreciate It! Thanks!
4 Replies
Create a macro like the following. Replace TABLE and INPUT with the actual names of your tables.
Sub MoveRow() Dim tbl1 As ListObject Dim tbl2 As ListObject Set tbl1 = ActiveSheet.ListObjects("TABLE") Set tbl2 = ActiveSheet.ListObjects("INPUT") tbl2.ListRows(1).Range.Cut Destination:=tbl1.ListRows.Add.Range Application.CutCopyMode = False End SubYou can create a command button on the sheet and assign the MoveRow macro to it, or assign a custom keyboard shortcut (or both)