consolidate workbooks between two other workbooks

G

Gerry

I have a budget program for many different companies, which have
different department names. I'm trying to write one macro to work with
all companies. I would like to consolidate all sheets between
worksheets Summary and IncStmt.

Can I do this without naming each sheet, as each company has different
worksheet names?

This is what I currently have;

Selection.Consolidate Sources:=Array( _
"Total!R4C2:R200C26", _
"CarryPlace!R4C2:R200C26", _
"Starling!R4C2:R200C26", _
"Wills!R4C2:R200C26", _
"'328Sid'!R4C2:R200C26", _
"'330Sid'!R4C2:R200C26", _
"'35Wil'!R4C2:R200C26", _
"'53Wil'!R4C2:R200C26", _
"'Jamieson'!R4C2:R200C26"), _
Function:=xlSum, TopRow:=False, LeftColumn:=True,
CreateLinks:=False

Total is always the first sheet, and sometimes it is the only sheet.

TIA
Gerry
 

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