bottom
Great ExcelTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > ExcelTips Home > Subtotals > Counting with Subtotals

Counting with Subtotals

Summary: The subtotaling features of Excel are used, quite often, to sum information in a data table. You aren’t limited to summing, however. You can use subtotaling to also provide a count of records, as described in this tip. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, and Excel 2003.)

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:

  1. Make sure there are column heads on each column, such as "Name" and "State." (The subtotaling feature requires the presence of column heads.)
  2. Sort the columns by the values in the second (states) column.
  3. Make sure one of the cells is still selected in either of the columns.
  4. Choose Subtotals from the Data menu. Excel displays the Subtotal dialog box. (Click here to see a related figure.)
  5. Make sure the At Each Change In drop-down list is set to State. (Use the name of the second column.) This indicates where Excel will insert subtotals.
  6. The Use Function drop-down list should be set to Count.
  7. Using the list in the Add Subtotal To box, choose the columns to which subtotals should be added.
  8. Make sure the Summary Below Data check box is selected.
  9. Click on OK.

Tip #2750 applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003


Got the Time? If you work with either times or dates in Excel, you really need ExcelTips: Times and Dates. Everything you need to know about slicing, dicing, and generally working with times and dates.

Helpful Links

Ask an Excel Question
Make a Comment

Tips.Net Home
Vital News Home

ExcelTips FAQ
ExcelTips Premium

Learn Access Now

Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

 

Great Info!

Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)