View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gerry[_4_] Gerry[_4_] is offline
external usenet poster
 
Posts: 19
Default consolidate workbooks between two other workbooks

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