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.
Returns
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應