Worksheet.ConsolidationFunction (Excel)
Returns the function code used for the current consolidation. Can be one of the constants of XlConsolidationFunction. Here you can find possible values for
Dim xcfConsolidationFunction As XlConsolidationFunction
xcfConsolidationFunction = ActiveSheet.ConsolidationFunction