Skip to content
本页内容

ConsolidationFunction (属性)

返回当前合并计算所使用的函数代码。可以是 XlConsolidationFunction 常量之一。int 类型,只读。

示例

python
#如果当前合并计算所使用的函数为 SUM 函数,本示例将显示一消息框
def test():
    if Worksheets.Item("Sheet1").ConsolidationFunction == xlSum:
        print("Sheet1 使用 SUM 函数合并。")
python
#本示例判断如果当前合并计算所使用的函数不是 Count 函数,则通知用户活动工作表合并计算所使用的函数代码
def test():
    if ActiveSheet.ConsolidationFunction != xlCount:
        print(ActiveSheet.ConsolidationFunction)