Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Consolidating multiple files using a row column range

Thanks Tom,

I did the following:

Selection.Consolidate Sources:=Array( _
"'C:\t\[a.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[b.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[c.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[d.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[e.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[f.xls]Sheet1'!R112C17:R4127C38"), _
Function:=xlSum, TopRow:=False, _
LeftColumn:=True, CreateLinks:=False

This did pass syntax, but gave me inaccurate results.

I converted !$Q$112:$AL$4127 to R112C17:R4127C38

Do you think that was right???

TIA,

Jim


-----Original Message-----
Think you need to replace your references with R1C1

notation. This is what
I recorded as an example:

Selection.Consolidate Sources:=Array( _
"'C:\Data\[Alex1.xls]Sheet1'!R3C3:R12C4" _
, "'C:\Data\[Alex2.xls]Sheet1'!R3C3:R12C4"), _
Function:=xlSum, TopRow:=False, _
LeftColumn:=True, CreateLinks:=False


Regards,
Tom Ogilvy


"Jim" wrote in message
...
Hi, trying to get the correct syntax for the following
file consolidation.

For files b,c,d,e,f I was using name1

I want to convert them to a specific range of

xls'Sheet1!
$Q$112:$AL$4127"

When I tried for file a, I got a macro error -
consolidation reference is not valid.

Selection.Consolidate Sources:=Array

("'C:\t\a.xls'Sheet1!
$Q$112:$AL$4127", _
"'C:\t\b.xls'!name1", "'C:\t\c.xls'!
name1", "'C:\t\d.xls'!name1", _
"'C:\t\e.xls'!name1", "'C:\t\f.xls'!name1"),
Function:=xlSum, TopRow:=False _
, LeftColumn:=False, CreateLinks:=False

Thanks,



.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Consolidating multiple files using a row column range

set rng = Range("$Q$112:$AL$4127")
? rng.address(true,true,xlr1c1)
R112C17:R4127C38

looks good to me.

Regards,
Tom Ogilvy

"Jim" wrote in message
...
Thanks Tom,

I did the following:

Selection.Consolidate Sources:=Array( _
"'C:\t\[a.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[b.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[c.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[d.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[e.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[f.xls]Sheet1'!R112C17:R4127C38"), _
Function:=xlSum, TopRow:=False, _
LeftColumn:=True, CreateLinks:=False

This did pass syntax, but gave me inaccurate results.

I converted !$Q$112:$AL$4127 to R112C17:R4127C38

Do you think that was right???

TIA,

Jim


-----Original Message-----
Think you need to replace your references with R1C1

notation. This is what
I recorded as an example:

Selection.Consolidate Sources:=Array( _
"'C:\Data\[Alex1.xls]Sheet1'!R3C3:R12C4" _
, "'C:\Data\[Alex2.xls]Sheet1'!R3C3:R12C4"), _
Function:=xlSum, TopRow:=False, _
LeftColumn:=True, CreateLinks:=False


Regards,
Tom Ogilvy


"Jim" wrote in message
...
Hi, trying to get the correct syntax for the following
file consolidation.

For files b,c,d,e,f I was using name1

I want to convert them to a specific range of

xls'Sheet1!
$Q$112:$AL$4127"

When I tried for file a, I got a macro error -
consolidation reference is not valid.

Selection.Consolidate Sources:=Array

("'C:\t\a.xls'Sheet1!
$Q$112:$AL$4127", _
"'C:\t\b.xls'!name1", "'C:\t\c.xls'!
name1", "'C:\t\d.xls'!name1", _
"'C:\t\e.xls'!name1", "'C:\t\f.xls'!name1"),
Function:=xlSum, TopRow:=False _
, LeftColumn:=False, CreateLinks:=False

Thanks,



.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Consolidating multiple files using a row column range

Thanks Tom,

I gave up on that approach.

I just went through all 60 files and expanded the name1
area manually.

Jim

-----Original Message-----
set rng = Range("$Q$112:$AL$4127")
? rng.address(true,true,xlr1c1)
R112C17:R4127C38

looks good to me.

Regards,
Tom Ogilvy

"Jim" wrote in message
...
Thanks Tom,

I did the following:

Selection.Consolidate Sources:=Array( _
"'C:\t\[a.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[b.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[c.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[d.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[e.xls]Sheet1'!R112C17:R4127C38" _
, "'C:\t\[f.xls]Sheet1'!R112C17:R4127C38"), _
Function:=xlSum, TopRow:=False, _
LeftColumn:=True, CreateLinks:=False

This did pass syntax, but gave me inaccurate results.

I converted !$Q$112:$AL$4127 to R112C17:R4127C38

Do you think that was right???

TIA,

Jim


-----Original Message-----
Think you need to replace your references with R1C1

notation. This is what
I recorded as an example:

Selection.Consolidate Sources:=Array( _
"'C:\Data\[Alex1.xls]Sheet1'!R3C3:R12C4" _
, "'C:\Data\[Alex2.xls]Sheet1'!R3C3:R12C4"), _
Function:=xlSum, TopRow:=False, _
LeftColumn:=True, CreateLinks:=False


Regards,
Tom Ogilvy


"Jim" wrote in message
...
Hi, trying to get the correct syntax for the

following
file consolidation.

For files b,c,d,e,f I was using name1

I want to convert them to a specific range of

xls'Sheet1!
$Q$112:$AL$4127"

When I tried for file a, I got a macro error -
consolidation reference is not valid.

Selection.Consolidate Sources:=Array

("'C:\t\a.xls'Sheet1!
$Q$112:$AL$4127", _
"'C:\t\b.xls'!name1", "'C:\t\c.xls'!
name1", "'C:\t\d.xls'!name1", _
"'C:\t\e.xls'!name1", "'C:\t\f.xls'!name1"),
Function:=xlSum, TopRow:=False _
, LeftColumn:=False, CreateLinks:=False

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
Consolidating multiple worksheets into one [email protected] Excel Worksheet Functions 2 April 2nd 09 06:49 PM
Consolidating multiple worksheets into one. Bovine Jones Excel Discussion (Misc queries) 2 October 17th 06 09:54 AM
need help in consolidating multiple data dromayn Excel Discussion (Misc queries) 0 December 6th 05 10:43 PM
Consolidating multiple worksheets Laura T. Excel Discussion (Misc queries) 1 August 17th 05 12:03 AM
Consolidating multiple workbooks John Robinson Excel Worksheet Functions 1 March 6th 05 09:14 PM


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