![](/uploads/1/2/7/1/127187895/484170988.jpg)
With the cursor still in the Company column, click the Data tab. Click Subtotal in the Outline group. In the resulting submenu, select Company from the At each change in drop-down (should be the. A 'subtotal' is simply a total of a subset of he items. SUMIF includes items in the sum IF they meet the specified condition—which often means IF the items have been assigned to a specific category.
Lesson 21: Groups and Subtotals/en/excel2016/filtering-data/content/ IntroductionWorksheets with a lot of content can sometimes feel overwhelming and even become difficult to read. Fortunately, Excel can organize data into groups, allowing you to easily show and hide different sections of your worksheet. You can also summarize different groups using the Subtotal command and create an outline for your worksheet.Optional: Download our.Watch the video below to learn more about groups and subtotals in Excel. Creating subtotalsThe Subtotal command allows you to automatically create groups and use common functions like SUM, COUNT, and AVERAGE to help summarize your data. For example, the Subtotal command could help to calculate the cost of office supplies by type from a large inventory order. It will create a hierarchy of groups, known as an outline, to help organize your worksheet.Your data must be correctly sorted before using the Subtotal command, so you may want to review our lesson on to learn more. To create a subtotal:In our example, we'll use the Subtotal command with a T-shirt order form to determine how many T-shirts were ordered in each size (Small, Medium, Large, and X-Large).
This will create an outline for our worksheet with a group for each T-shirt size and then count the total number of shirts in each group. First, sort your worksheet by the data you want to subtotal. In this example, we'll create a subtotal for each T-shirt size, so our worksheet has been sorted by T-shirt size from smallest to largest. To view groups by level:When you create subtotals, your worksheet it is divided into different levels. You can switch between these levels to quickly control how much information is displayed in the worksheet by clicking the Level buttons to the left of the worksheet.
In our example, we'll switch between all three levels in our outline. While this example contains only three levels, Excel can accommodate up to eight. Click the lowest level to display the least detail. In our example, we'll select level 1, which contains only the grand count, or total number of T-shirts ordered.
![](/uploads/1/2/7/1/127187895/484170988.jpg)