Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default compiling data from multiple Excel sheets - macro?

Hi,

My lab is running a program that produces data for each file on separate
work sheets with 54 lines of data per sheet. I now need to compiled all of
the data from each sheet into one worksheet, with one row per file (one
file=one person in research project). I've heard a macro is the way to do
this but have little to no experience with this. My worksheets are piling up
and I can't imagine having to copy and paste these every time!

Any thoughts would be very much appreciated -- thank you in advance for your
time!!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default compiling data from multiple Excel sheets - macro?

Look at this:
http://www.rondebruin.nl/copy2.htm

I've used it multiple times! It works great!!


Regards,
Ryan---

--
RyGuy


"Stephanie Mistretta" wrote:

Hi,

My lab is running a program that produces data for each file on separate
work sheets with 54 lines of data per sheet. I now need to compiled all of
the data from each sheet into one worksheet, with one row per file (one
file=one person in research project). I've heard a macro is the way to do
this but have little to no experience with this. My worksheets are piling up
and I can't imagine having to copy and paste these every time!

Any thoughts would be very much appreciated -- thank you in advance for your
time!!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default compiling data from multiple Excel sheets - macro?

.. need to compile all of the data from each sheet into one worksheet

Perhaps you meant to do something like this ..
Assume you have identically structured sheets named simply as: 1, 2, 3, ...
Assume source data is within A2:B4 in each sheet,
eg in sheet: 1,
1 11
2 22
3 33

and in sheet: 2,
11 111
22 222
33 333

In a new sheet,
Place this in say, A2:
=OFFSET(INDIRECT("'"&INT((ROWS($1:1)-1)/3)+1&"'!A2"),MOD(ROWS($1:1)-1,3),COLUMNS($A:A)-1)
Copy A2 to B2, fill down as far as required. This will extract & stack data
from all sheets named: 1, 2, 3 etc in sequence by the sheetname #, viz for
the example data above, it'll appear as:

1 11
2 22
3 33
11 111
22 222
33 333
etc

Points to note when adapting the above to suit:
1. The top left, anchor cell in the above source sheets: 1,2 is A2,
viz this part: ..&"'!A2". Change the "A2" to suit your actual anchor
2. The "3" within both the INT and MOD parts, viz:
INT((ROWS($1:1)-1)/3)
MOD(ROWS($1:1)-1,3)
refer to the number of rows to be extracted in each sheet.
Change this number to suit your actuals

Example: Suppose your anchor cell is say, A5, and you have 54 lines to
extract from each sheet, then you could use this in A2 in the new sheet:
=OFFSET(INDIRECT("'"&INT((ROWS($1:1)-1)/54)+1&"'!A5"),MOD(ROWS($1:1)-1,54),COLUMNS($A:A)-1)
Copy across by as many cols as required, fill down as far as required
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Stephanie Mistretta" wrote:
My lab is running a program that produces data for each file on separate
work sheets with 54 lines of data per sheet. I now need to compiled all of
the data from each sheet into one worksheet, with one row per file (one
file=one person in research project). I've heard a macro is the way to do
this but have little to no experience with this. My worksheets are piling up
and I can't imagine having to copy and paste these every time!

Any thoughts would be very much appreciated -- thank you in advance for your
time!!

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
compiling data from multiple excel files compiling multiple excel files Excel Discussion (Misc queries) 1 April 21st 08 05:39 PM
Compiling data from many work sheets to one justme Excel Discussion (Misc queries) 1 July 18th 07 11:09 PM
Compiling data from multiple worksheets into one worksheet thelonious419 Excel Discussion (Misc queries) 1 April 24th 06 06:16 PM
Compiling information from multiple excel files DKP Excel Discussion (Misc queries) 1 April 7th 06 07:08 PM
comparing and compiling between sheets lwhite Excel Discussion (Misc queries) 0 March 24th 05 06:59 PM


All times are GMT +1. The time now is 06:11 AM.

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"