View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Consolidating Workbook Sheets (i.e., Tabs)

Hi Bob

Try
http://www.rondebruin.nl/copy2.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob" wrote in message ...
I have a workbook with 5 sheets (i.e., tabs) that I need to consolidate into
a 6th sheet within the same workbook. Obviously, the column headings are the
same on each sheet. I am trying to write a macro that will copy the data
from each of the 5 sheets (columns A thru BD, and always starting with row 7)
and append the data in the 6th sheet. The problem I'm encountering is that
the number of rows of data on each of the 5 sheets is different and can vary
over time. So the macro needs to first determine how many rows of data exist
on a given sheet and then copy that range to the 6th sheet.

Example: If Sheet1 has data in rows 7 thru 19, and Sheet2 has data in rows 7
thru 23, then the macro would copy rows 7 thru 19 in Sheet1 to rows rows 7
thru 19 in Sheet6. Next, it would copy rows 7 thru 23 in Sheet2 to rows 20
thru 37 in Sheet6, etc.

Being new to VBA, I would greatly appreciate any help in writing the
aforementioned macro. Thanks in advance for any assistance.

Bob