Range.Consolidate(Object, Object, Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Consolidates data from multiple ranges on multiple worksheets into a single range on a single worksheet.
public object Consolidate (object Sources, object Function, object TopRow, object LeftColumn, object CreateLinks);
Public Function Consolidate (Optional Sources As Object, Optional Function As Object, Optional TopRow As Object, Optional LeftColumn As Object, Optional CreateLinks As Object) As Object
Parameters
- Sources
- Object
Optional Object. The sources of the consolidation as an array of text reference strings in R1C1-style notation. The references must include the full path of sheets to be consolidated.
- Function
- Object
Optional XlConsolidationFunction. Can be one of the following XlConsilidationFunction constants:xlAveragedefault
xlCountxlCountNumsxlMaxxlMinxlProductxlStDevxlStDevPxlSumxlVarxlVarP
- TopRow
- Object
Optional Object. True to consolidate data based on column titles in the top row of the consolidation ranges; False to consolidate data by position. The default value is False.
- LeftColumn
- Object
Optional Object. True to consolidate data based on row titles in the left column of the consolidation ranges; False to consolidate data by position. The default value is False.
- CreateLinks
- Object
Optional Object. True to have the consolidation use worksheet links; False to have the consolidation copy the data. The default value is False.