LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default Data Aggregation Question...

Hi All

I have a workbook that pulls in datasheets from other workbooks, and renames
the datasheets Datasheet 1, Datasheet 2, etc...

I then use a bit of code to calculate the values of all sheets named
'DataSheet' onto another sheet within the workbook.

My 'calculation' code is below, but I'm wondering if this is the best way to
do it, or whether there is a worksheet formula I should use? (Indirect?)

Thanks in advance.

Trevor Williams

Private Sub CalcAllData()
Dim sh As Worksheet
Range("A1:R57").ClearContents
For Each sh In ActiveWorkbook.Sheets
If sh.Name Like "Datasheet*" Then
For x = 1 To 57
For y = 1 To 18
ActiveSheet.Cells(x, y) = ActiveSheet.Cells(x, y).Value +
sh.Cells(x, y).Value
Next
Next
End If
Next
End Sub


 
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
Data aggregation with multiple workbooks Kadco Excel Discussion (Misc queries) 1 May 10th 10 10:19 PM
Data aggregation with multiple workbooks Kadco Setting up and Configuration of Excel 0 May 3rd 10 09:54 PM
Aggregation on Column Value (groub by logic) tera Excel Programming 2 December 13th 07 05:39 PM
Aggregation... Ted Buoy Excel Discussion (Misc queries) 2 June 11th 07 08:15 PM
pie charts with aggregation [email protected] Charts and Charting in Excel 1 July 16th 06 11:53 AM


All times are GMT +1. The time now is 05:35 PM.

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

About Us

"It's about Microsoft Excel"