      Home XP Windows Vista Windows 7 Windows Azure Windows Server Windows Phone Windows 7

# Microsoft Excel 2010 : Formatting Subtotals, Applying Multiple Subtotal Function Types (part 2) - Combining Multiple Subtotals to One Row

12/3/2013 3:14:28 AM

#### 2.2 Combining Multiple Subtotals to One Row

When applying multiple function types, Excel places each subtotal on its own row. There is no built-in option to have the subtotals appear on the same row. But you can manipulate Excel to make this happen by applying a subtotal to a column where you don’t want it, and then manually changing the formula.

##### Portraying Multiple Function Types on a Single Row

To have multiple function types appear on a single row, as shown in Figure 2, follow these steps:

1.
Sort the data by the column the summary should be based off of. For example, if summarizing by region, sort the Region column.

2.
Select a cell in the dataset.

3.
Go to Data, Outline, Subtotal.

4.
From the At Each Change In field, select the column by which to summarize the data.

5.
From the Use Function field, select the function to calculate the totals by.

6.
From the Add Subtotal To field, select the columns the totals should be added to. Also select the column where you want to apply the second function type, like the Customer column selected in Figure 3.

7.
Click OK.

8.
Collapse the dataset by clicking the “2” outline symbol so only the total rows are visible.

9.
Select the data in the column where the second function type should be.

10.
Go to Home, Editing, Find & Select, Go to Special, and select Visible Cells Only.

11.
Go to Home, Editing, Find & Select, Replace.

12.
In the Find What field, type “SUBTOTAL(9,”.

13.
In the Replace With field, type the subtotal function using the desired function number. For example, in Figure 4, “SUBTOTAL(2,” will replace the SUM function with the COUNTA function.

14.
Click Replace All.

15.
Click OK to close the Excel notification of the number of replacements made.

16.
Click Close. If needed, apply any required formatting to the selected cells.

##### Figure 2. Columns F:H are sums of the grouped data, but column D is a count of the data, as shown in the formula bar (3 is the function code for COUNTA). ##### Figure 3. The Customer column is selected as a temporary holder for the actual subtotal formula that will be used. ##### Figure 4. Use Find and Replace to replace the automated subtotals with the desired function argument. Other -----------------

 Top 10
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8   Windows Vista Windows 7 Windows Azure Windows Server