Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Counting with PivotTables.

Counting with PivotTables

Written by Allen Wyatt (last updated January 21, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003


Suppose you have a data table set up in Excel that represents your club membership. In the first column are the names of club members. In the second column are the cities in which the members live. If you want to find out how many people live in each city, there are several methods you can choose. One method is to create a PivotTable.

To create a PivotTable on your data, follow these steps:

  1. Select a cell within your data table.
  2. Choose the PivotTable and PivotChart Report option from the Data menu. Excel begins the PivotTable and PivotChart Wizard. (See Figure 1.)
  3. Figure 1. The PivotTable and PivotChart Wizard.

  4. Choose the Microsoft Excel List or Database option.
  5. Indicate you want to create a PivotTable, then click on Next.
  6. In the Range box, make sure your entire data table is selected, then click on Next.
  7. Indicate you want to put the PivotTable in a new worksheet, then click on Finish. Excel creates the bare-bones PivotTable worksheet, and the PivotTable Field List dialog box is visible.
  8. Drag the City field button from the PivotTable dialog box to the Row area of the PivotTable.
  9. Drag the Name field button from the PivotTable dialog box to the Data area of the PivotTable. Your PivotTable is complete.

The above steps won't work, however, if you are using Excel 97. Follow these steps instead:

  1. Select a cell within your data table.
  2. Choose the PivotTable Report option from the Data menu. Excel begins the PivotTable Wizard.
  3. Choose the Microsoft Excel List or Database option and click on Next.
  4. In the Range box, make sure your entire data table is selected, then click on Next.
  5. Drag the City field button to the Row area of the PivotTable builder.
  6. Drag the Name field button to the Data area of the PivotTable builder.
  7. Click on Finish. A new worksheet is created that contains your PivotTable.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3165) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Counting with PivotTables.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Turning the Legend On and Off

When you create a chart in Excel, the program may automatically add a legend that explains the contents of the chart. In ...

Discover More

Creating a Function Inventory for a Workbook

Your worksheets are very often made up of formulas and these formulas are made up of functions. If you ever want to ...

Discover More

Strip Trailing Spaces

If you get tired of documents that always seem to have extra spaces at the end of lines, here's a quick way to get rid of ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (menu)

Suppressing Zero Values in PivotTables

PivotTables are great for digesting and analyzing huge amounts of data. But what if you want part of that data excluded, ...

Discover More

Changing the Default PivotTable Functions

When you create a PivotTable, Excel automatically sums the data that you place into the Data Items area of the table. ...

Discover More

Formatting a PivotTable

You can format PivotTables using either manual formatting or automatic formatting. You need to be careful, however, as ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.