.Subtotal(GroupBy, Function, TotalList, Replace, PageBreaks, SummaryBelowData) Parameters GroupBy - The field to group by, as a one-based integer offset. For more information, see the example. Function - XlConsolidationFunction . The subtotal function. TotalList - An array of 1-based field offsets, indicating the fields to which the subtotals are added. Replace - True to replace existing subtotals. The default value is True. PageBreaks - True to add page breaks after each group. The default value is False. SummaryBelowData - XlSummaryRow . Places the summary data relative to the subtotal. #DEFINE xlSum -4157 DIMENSION laCols[1] laCols[1] = 3 oRange.Subtotal(2, xlSum, @laCols, .T., .F., .T.)>
>oRange = oSheet.Range(oSheet.Cells(1, 1), oSheet.Cells(14, 3)) >oRange.Subtotal(2, xlSum, Array(3), .T., .F., .T.) >>