ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help Consolidate method (https://www.excelbanter.com/excel-programming/358731-help-consolidate-method.html)

Andrew Baranov

Help Consolidate method
 
Hi, Help me please
I can't make it work

Worksheets("Sheet1").Range("A1").Consolidate _
Sources:=Array("'[File1.xls]Sheet2'!R1C1:R37C6",
"'[File2.xls]Sheet3'!R1C1:R37C6"), _
Function:=xlSum

I allays get message 'Can't open file '[File1.xls]Sheet2'
Even if I write
aSources = Worksheets("Sheet1").ConsolidationSources
Worksheets("Sheet1").Range("A1").Consolidate _
Sources:=aSource, _
Function:=xlSum

with workung source references I get the same message

Thank you in advance




All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com