Appending Data from one sheet to a master sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
Back
Top