Consolidate data to summary sheet

I

Ian

I'm sure this is an easy task, but I'm not sure where to start.

I have a workbook with a number of worksheets. The number of sheets will
increase over time.

I need to produce a sheet combining certain columns from all the other
sheets. How can I do this?

eg On sheet "Summary", starting on row 2 I need the data from sheet "John
Smith" columns A:D row 2 to the last occupied row. Under this data on
"Summary" I need the equivalent data from sheet "Tom Jones" etc.

I hope this is clear.
 
J

Joel

for each sht in Thisworkbook.sheets
if sht.name <> "Summary" then
SumLastRow = Sheets("Summary").Range("A" & Rows.Count).end(xlup).Row
SumNewRow = SumLastRow + 1
ShtLastRow = sht.Range("A" & Rows.Count).end(xlup).Row
sht.Range("A2:D" & ShtLastRow).copy _
destination:=Sheets("Summary").Range("A" & SumNewRow)
end if
next sht
 

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