Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Consolidate Worksheet Data

Hi -

I'm using Excel 97 in Windows 2000.

I have a workbook that has 50 sheets. Each sheet has
information about one of my stores. They are all
basically identical in layout & type of data. For
example, Col A holds Employee ID, Col B holds Employee
Name, and Col C holds Salary. I don't have more than 10
rows per sheet. I'd like to build a macro that would copy
all of this data and paste it into a "total company"
worksheet. Any suggestions? Thanks in advance! Matt
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Consolidate Worksheet Data

Matt,

Something like this (untested). Amend to fit your needs.

Dim pasterow as Long, copyrow as Long, x as Integer
Application.ScreenUpdating = False

'Use this section to clear the Company sheet
''''''''''''''''''''''''''''''''''''''''
pasterow = Sheets("Company").Cells(Rows.COUNT, "A").End(xlUp).Row '
[fix word wrap]
Sheets("Company").Range(Rows(2),Rows(pasterow)).Cl earContents
''''''''''''''''''''''''''''''''''''''''

For x = Sheets("Sheet1").Index to Sheets("Sheet50").Index
Sheets(x).Select
pasterow = Sheets("Company").Cells(Rows.COUNT, "A").End(xlUp).Row '
[fix word wrap]
copyrow = Sheets(x).Cells(Rows.COUNT, "A").End(xlUp).Row

Sheets(x).Range(Rows(2),Rows(copyrow)).Copy _
Destination:= Sheets("Company").Cells(pasterow,1)
Next

Sheets("Company").Select
Application.ScreenUpdating = True
--
sb
"Matt" wrote in message
...
Hi -

I'm using Excel 97 in Windows 2000.

I have a workbook that has 50 sheets. Each sheet has
information about one of my stores. They are all
basically identical in layout & type of data. For
example, Col A holds Employee ID, Col B holds Employee
Name, and Col C holds Salary. I don't have more than 10
rows per sheet. I'd like to build a macro that would copy
all of this data and paste it into a "total company"
worksheet. Any suggestions? Thanks in advance! Matt



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Consolidate data from worksheet (more then 65536 rows) Mandeep Dhami Excel Discussion (Misc queries) 1 January 16th 08 09:49 AM
Consolidate Worksheet Contents Sriram Excel Worksheet Functions 0 December 3rd 07 07:00 AM
How do I consolidate multiple worksheet files into one workbook Bentbrip Excel Discussion (Misc queries) 1 March 15th 07 09:29 PM
Consolidate different worksheets into one worksheet Hennie Excel Discussion (Misc queries) 4 July 29th 06 12:36 AM
Consolidate multiple workbooks into a single worksheet Krista Excel Worksheet Functions 1 May 15th 06 05:10 PM


All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"