Tuesday 20 November 2012

Microsoft Excel 2008: Subtotal (Functions) (Mac)

Subtotal (Functions)




The Subtotal function allows you to set up a calculation in your worksheet. Then, by filtering the data, the same calculation is performed on subsets of your data. The Subtotal function ignores values in rows hidden by a filter. It can be used with Tables or any range of data.

Using the Subtotal Function

The Subtotal function is easily created with the Function Arguments dialog box. The first piece of information you will need is the Function Numbers. This determines what type of calculation will be performed.
  1. Open the desired worksheet
  2. Select the cell where you want the result of the function to appear
    NOTE: If you are filtering your worksheet, make sure that the selected cell is below your data. This allows you to see the results.
  3. Click TOOLBOXToolbox button
    The Formula Builder appears.
    Formula Builder dialog box
  4. In the Search for a function text box, type Subtotal
    OR
    Scroll to the Math and Trigonometry section
  5. Double click SUBTOTAL
    The Arguments section appears on the Formula Builder.
    Formula Builder - Subtotal Arguments section
  6. In the function_num text box, type the number of the function you would like to perform
    HINT: For more information, refer to Function Numbers.
  7. In the ref1 text box, type the range of cells to be analyzed
    OR Select the range of cells to include
  8. Press [return]
    The subtotal appears in the selected cell and the formula appears in the Formula Bar.
    EXAMPLE: In the formula =SUBTOTAL(1,D2:D11), 1 designates the calculation from the function_num text box as an average, and D2:D11 designates the cell range from the ref1 text box.

Using a Filter to Analyze Subsets

If you have applied a Subtotal function to a section of your worksheet and want to see results for a specific category of information contained within that subtotal, you can hide rows by filtering the field. After filtering, the function will calculate with only the rows that are visible, allowing you to see customized results. For more information on filtering, refer to Filtering Your Database.
  1. Click within the row of column headings
  2. From the Data menu, select Filter » AutofilterPull-down menus appear in each of the selected cells.
    Filtering a database
  3. On the desired column, from the pull-down list, select the desired option
    EXAMPLE: If you only wanted to work with entries that were registered on June 1st, 2008, selecting 6/1/08 would hide all entries that were not registered on that date.

Modifying the Subtotal Function

Once you perform one of the Subtotal calculations on your data, you can change the calculation at any time by modifying the existing function. This allows you to perform additional calculations on the same data.
  1. Select the cell where the Subtotal function is being performed
    The function appears in the Formula Bar.
  2. On the Formula Builder, in the Arguments section, in the function_num text box, change the value
    HINT: Choose from the list of possible calculations.
  3. Press [return]

Function Numbers

The Subtotal function allows you to work several different calculations on your selected data. In order for the function to work correctly, you will need to use the number of the correct calculation when prompted.
#CalculationDescription
1AVERAGEAdds all entries and then divides by the number of entries
2COUNTCounts the number of entries containing numbers
3COUNTACounts the number of entries that are not blank (includes text entries)
4MAXReports the highest number of all the entries
5MINReports the lowest number of all the entries
6PRODUCTMultiplies all the entries together
7STDEVComputes the standard deviation, assuming the selection is a sample of the entire population
8STDEVPComputes the standard deviation, assuming the selection is the entire population
9SUMAdds all entries together
10VARComputes the variance, assuming the selection is a sample of the entire population
11VARPComputes the variance, assuming the selection is the entire population

An Example

The example below shows data about employees' time worked in particular pay periods. With this unfiltered data, the Subtotal function used at the bottom of the Hours column reflects the maximum number of hours worked by any employee.
Example of an unfiltered table using the Subtotal function
The image below shows the results of filtering the data. After applying a filter so that only Justin's information is visible, the Subtotal function calculates the maximum hours that Justin worked.
Example of a filtered table using the Subtotal function


 
 
 
Make sure to let me know in the comments below or on our
Facebook page how you've got with it or Do you have any questions

No comments:

Post a Comment