I am trying to create a pivot table using Excel 2013 VBA with DISTINCT COUNT as a value field.
I understand that if you create the pivot table manually, you have to
Use Excel.XlConsolidationFunction if not able to get directly like Excel.XlConsolidationFunction.xlDistinctCount
Excel.XlConsolidationFunction
Excel.XlConsolidationFunction.xlDistinctCount