What version you using? How are you formatting?
Make sure the data you want to subtotal is in the following format:
1 - Each column has a label in the first row and contains similar facts.
2 - There are no blank rows or columns within the range.
3 - Click a cell in the column to subtotal.
Then:
1 -Click Sort Ascending or Sort Descending .
2 - On the Data menu, click Subtotals.
3 - In the At each change in box, click the column to subtotal.
4 - In the Use function box, click the summary function (summary function: A type of calculation that combines source data in a PivotTable report or a consolidation table, or when you are inserting automatic subtotals in a list or database. Examples of summary functions include Sum, Count, and Average.) you want to use to calculate the subtotals.
5 - In the Add subtotal to box, select the check box for each column that contains values you want to subtotal. In the example above, you'd select the Sales column.
Extras:
1 - If you want an automatic page break after each subtotal, select the Page break between groups check box.
2 - If you want the subtotals to appear above the subtotaled rows instead of below, clear the Summary below data check box.
3 - Click OK.
Note You can use the Subtotals command again to add more subtotals with different summary functions. To avoid overwriting the existing subtotals, clear the Replace current subtotals check box.
OR
To add subtotals to primary and secondary fields:
1. Sort, in ascending order, the field for which you want to have the secondary subtotal. In this example (see screenshot), Customer Name is the secondary field.
2. Sort, in ascending order, the field for which you want to have the primary subtotal. In this example (see screenshot), Market is the primary field.
3. Click the Subtotals box.
4. From the At each change in dropdown list, select Market.
5. In Add Subtotal to, select the Quantity and Income checkboxes.
6. Deselect the Replace current subtotals checkbox, and then click OK.
7. Repeat steps 3 and 4, and select Customer Name.
8. Click OK.