Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default Using an array in Consolidation

Hello everyone. I was hoping you could help with a relatively simple
problem. I am using the consolidation function in VBA, and have the
following code:

' Forecast.Select
' Range("B5").Select
' Selection.Consolidate Sources:=Array( _
' "'Sheet1'!R1C2:R10000C17" _
' , "'Sheet3'!R1C2:R10000C17" _
' , "'Sheet5'!R1C2:R10000C17" _
' , "'Sheet7'!R1C2:R1000C17" _
' ), Function:=xlSum, TopRow:=True, LeftColumn:=True,
CreateLinks:=False

I have already created an array for the sheets:
Set shtarray = Sheets(Array("Sheet1", "Sheet3", "Sheet5", "Sheet7"))

How do I use the shtarray variable in the consolidation statement so I
don't have to rename each sheet again? Thannks so much!!

-Steph
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
Consolidation Raja Excel Discussion (Misc queries) 3 January 20th 08 03:29 AM
Consolidation reno Excel Discussion (Misc queries) 0 October 31st 07 09:07 PM
consolidation rln3333 Excel Discussion (Misc queries) 2 November 29th 06 11:55 AM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
consolidation nance666 Excel Discussion (Misc queries) 1 August 26th 05 01:49 PM


All times are GMT +1. The time now is 06:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"