Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default data consolidation using vba

I have a complex workbook and i would like to use the data /
consolidation functionality to combine information from a number of
worksheets. The names of these worksheets are dynamic.

I have created an array (mystr) with the worksheet names and when i do
a msgbox on the array the information is as follows:

'H:\[2009 Jan to Jun Books.xls]Exp Jan 24 25'!R33C1:R100C2", "'H:
\[2009 Jan to Jun Books.xls]Exp Jan 31 1'!R33C1:R100C2", "'H:\[2009
Jan to Jun Books.xls]Exp Feb 7 8'!R33C1:R100C2", H:\[2009 Jan to Jun
Books.xls]Exp Feb 14 15'!R33C1:R100C2"

I then do:

Sheets("" & emname & "").Select 'select current expenses sheet
Range("A33").Select

Selection.Consolidate Sources:=mystr, Function:=xlSum, _
TopRow:=False, LeftColumn:=True, CreateLinks:=False

The error message I receive is:

"Run-time error: '1004':
Consoliate method of range class failed

I would appreciate any input.

Thanks
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
Consolidation - including text consolidation Todd1 Excel Programming 1 November 22nd 07 02:50 PM
data consolidation baron Excel Discussion (Misc queries) 0 May 21st 07 12:31 AM
Need how-to or example for data consolidation jtroper Excel Worksheet Functions 1 April 24th 06 09:55 PM
Data Consolidation scantor145[_2_] Excel Programming 1 September 28th 04 04:22 PM
Data Consolidation scantor145 Excel Programming 1 September 27th 04 07:39 PM


All times are GMT +1. The time now is 01:16 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"