Difference between revisions of "Documentation/OOo3 User Guides/Calc Guide/Creating subtotals"

From Apache OpenOffice Wiki
Jump to: navigation, search
(New page: {{DISPLAYTITLE:Creating subtotals}} {{Documentation/CG3Ch7TOC |ShowPrevNext=block |PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Consolidating data |NextPage=Documentation/OOo3_User_G...)
 
 
Line 7: Line 7:
 
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'''.
 
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 a array—that is, a group of cells with labels for columns and/or rows. Using the Subtotals dialog, you can select arrays, then choose a statistical function to apply to them. For efficiency, you can choose up to three groups of arrays to which to apply a function. When you click '''OK''', Calc adds subtotals and grand totals to the selected arrays, using the Result and Result2 cell styles for them.
+
As the name suggests, SUBTOTAL totals data arranged in a 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:
 
To insert subtotal values into a sheet:
Line 13: Line 13:
 
# Ensure that the columns have labels.
 
# Ensure that the columns have labels.
 
# Select the range of cells that you want to calculate subtotals for, and then choose '''Data > Subtotals'''.
 
# Select the range of cells that you want to calculate subtotals for, and then choose '''Data > Subtotals'''.
# In the Subtotals dialog, in the '''Group by''' box, select the column that you want to add the subtotals to. If the contents of the selected column change, the subtotals are automatically recalculated.
+
# 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.
# In the '''Calculate subtotals for''' box, select the columns containing the values that you want to subtotal.
+
# In the '''Calculate subtotals for''' box, select the columns containing the values that you want to create subtotals for. If the contents of the selected columns change later, the subtotals are automatically recalculated.
 
# In the '''Use function''' box, select the function that you want to use to calculate the subtotals.
 
# In the '''Use function''' box, select the function that you want to use to calculate the subtotals.
 
# Click '''OK'''.
 
# Click '''OK'''.

Latest revision as of 17:44, 31 December 2010



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 a 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.
  4. In the Calculate subtotals for box, select the columns containing the values that you want to create subtotals for. If the contents of the selected columns change later, the subtotals are automatically recalculated.
  5. In the Use function box, select the function that you want to use to calculate the subtotals.
  6. Click OK.
Setting up subtotals

If you use more than one group, then you can also arrange the subtotals according to choices made on the dialog’s Options page, including ascending and descending order or using one of the predefined custom sorts defined in Tools > Options > OpenOffice.org Calc > Sort Lists.

Choosing options for subtotals


Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools