ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Appending Data from one sheet to a master sheet (https://www.excelbanter.com/excel-programming/328452-appending-data-one-sheet-master-sheet.html)

gusto79

Appending Data from one sheet to a master sheet
 
I have a worksheet in excel that performs calculations, based on my input to
certain cells, and creates a table. I want to click a button and paste that
table to a 'master' table. I want to repeat this same step for different
inputs and have excel append each new table to the bottom of the 'master'
table.

Davie

Appending Data from one sheet to a master sheet
 
Try assigning this to a button

TABLE and MASTER TABLE will have to be changed to thr names of your sheets
and the range A1:E10 will have to be changed to the range of your
calculation table. It also assumes that your master table starts in column A
and always contains data.

Sub AddDataToTable()
Dim iLastRow As Long

ThisWorkbook.Sheets("TABLE").Range("A1:E10").Copy
ThisWorkbook.Sheets("MASTER TABLE").Select
iLastRow = ThisWorkbook.Sheets("MASTER TABLE").Rows.Count
Range("A" & iLastRow).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub

gusto79 wrote in message
...
I have a worksheet in excel that performs calculations, based on my input

to
certain cells, and creates a table. I want to click a button and paste

that
table to a 'master' table. I want to repeat this same step for different
inputs and have excel append each new table to the bottom of the 'master'
table.





All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com