Consolidate data to summary sheet
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. -- Ian -- |
Consolidate data to summary sheet
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 "Ian" wrote: 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. -- Ian -- |
All times are GMT +1. The time now is 02:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com