Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Counting with Subtotals.
by Allen Wyatt
(last updated January 12, 2019)
Suppose that you have two adjacent columns of data. In the first column you have a list of names and in the second column a list of states. If you want to find out how many people live in each state, you can use the subtotaling features of Excel. To use this feature to answer your query, follow these steps:
Figure 1. The Name/State Fields of the Subtotal dialog box.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8035) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Counting with Subtotals.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Excel provides some great tools that can help you see the relationships between the formulas in your worksheets. These ...Discover More
The Trace Precedents auditing tool can be quite helpful in seeing which cells "feed into" a particular formula. The ...Discover More
Page breaks not appearing where you expect them in your subtotaled data? It could be because of a setting you made in ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.