Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 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 PivotTables.

Counting with PivotTables

Written by Allen Wyatt (last updated March 8, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


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. Make sure the Insert tab of the ribbon is displayed.
  3. In the Tables group, click the PivotTable tool.
  4. Excel displays the Create PivotTable dialog box. (See Figure 1.)
  5. Figure 1. The Create PivotTable dialog box.

  6. In the Range box, make sure your entire data table is selected, then click on OK. Excel creates an empty PivotTable worksheet.
  7. Drag the City field from the field list to the Row Labels area.
  8. Drag the Name field from the field list to the Values area. Your PivotTable is complete.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6160) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel 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

Adding Borders to Paragraphs

Want to draw attention to a particular paragraph? A great way to do it is with a border. Word allows you to easily add ...

Discover More

Getting Rid of Spreadsheet Panes

When working with different parts of your worksheet at the same time, it is often helpful to utilize panes. Here's how to ...

Discover More

Repeating Rows at the Bottom of a Page

Excel allows you to repeat rows at the top of every page of a printout. If you want to repeat rows at the bottom of every ...

Discover More

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!

More ExcelTips (ribbon)

Turning Off Automatic Sorting in PivotTables

Tired of your data being sorted when you create a PivotTable? Excel allows you to specify how the sorting should occur by ...

Discover More

Missing PivotTable Data

Wonder what happened to the data behind a PivotTable? It could be in a number of places, and tracking it down could be a ...

Discover More

Expanding PivotTable Rows to Sheets

PivotTables are a great way to work with large quantities of data in an intelligent manner. Sometimes, however, you just ...

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 6 - 6?

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 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.

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.