Calc Guide
Creating subtotals
SUBTOTAL is a function listed under the Mathematical category when
you use the Function Wizard (Insert > Function). Because of its
usefulness, the function has a graphical interface accessible from Data
> Subtotals.
As the name suggests, SUBTOTAL totals data arranged in an array—
that is, a group of cells with labels for columns. Using the Subtotals
dialog, you can select up to three arrays, then choose a statistical
function to apply to them. When you click OK, Calc adds subtotal and
grand total rows to the selected arrays, using the Result and Result2
cell styles to differentiate those entries. By default, matching items
throughout your array will be gathered together as a single group
above a subtotal.
To insert subtotal values into a sheet:
1) Ensure that the columns have labels.
2) Select the range of cells that you want to calculate subtotals for,
and then choose Data > Subtotals.
3) In the Subtotals dialog, in the Group by list, select the column by
which the subtotals need to be grouped. A subtotal will be
calculated for each distinct value in this column.
Figure 224: Setting up subtotals
Chapter 9 Data Analysis 275