Appending Data from one sheet to a master sheet

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.
 
D

Davie

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top