Excel.Tips.Net Welcome toExcel.Tips.Net

Helpful Links

Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment

Tips.Net Store

ExcelTips FAQ
ExcelTips Premium

Learn Access Now
Free Printable Forms

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

Newest Tips

Removing Borders

Converting to Octal

Filtering Columns for Unique Values

Printing Multiple Worksheets on a Single Page

Changing the Default Font

Creating a Drawing Object

Determining a Value of a Cell

 

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.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2750) applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003

Change Formatting Based On Your Data! Conditional formatting provides a way for you to adjust the appearance of your data based on the data itself. Discover how to put this amazingly powerful feature to work for you, today. This comprehensive volume is available in two editions.
 
Check out Excel Conditional Formatting today!