Mar 10 2021 11:08 AM
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!
Mar 10 2021 12:42 PM
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 Sub
You can create a command button on the sheet and assign the MoveRow macro to it, or assign a custom keyboard shortcut (or both)
Mar 10 2021 02:10 PM
Mar 10 2021 02:16 PM
Do you mean that your table has lots of empty rows?
Mar 10 2021 02:24 PM