Help Consolidate method

A

Andrew Baranov

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top