Pivot Table Issues

Create a ZIP Code and City Frequency Report in Excel

Phi Hung VoPhi Hung Vo Nov 18, 2026 869 views

Question details

Create a frequency report showing the number of visits by ZIP code and city.

Create a ZIP Code and City Frequency Report in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Summarize visit records by location and visualize the results.
Observed behavior
The desired report counts visits for each ZIP code and city without complex formulas.
Before you start

Make sure your data has column headers for ZIP Code and City and a field that is populated for every visit, such as Visit ID. Store ZIP codes as text if they contain leading zeros.

Solution 1Recommended

Count visits by ZIP code and city with a PivotTable

Use a PivotTable to group location records and a PivotChart to visualize the counts.

1
Format the source data

Select a cell in the data, choose Insert > Table, and confirm that the table has headers.

2
Insert a PivotTable

Select a cell in the table, choose Insert > PivotTable, select where to place it, and click OK.

3
Group locations

In the PivotTable Fields pane, drag ZIP Code to Rows, then drag City below it in the Rows area.

4
Count visits

Drag Visit ID or another field populated for every visit to Values. Open its Value Field Settings and select Count.

5
Create a chart

Select the PivotTable, choose Insert > PivotChart, select a chart type, and click OK.

Count visits by ZIP code and city with a PivotTable
Counting records: Count includes nonblank entries in the selected field. Each row should represent one visit if the report is intended to count visits.
Summarize visits in WPS Spreadsheets

Create a ZIP Code Frequency Report in WPS Spreadsheets

Use a PivotTable in WPS Spreadsheets to count visits by ZIP code and city, then create a chart from the summarized data.

  1. 1. Open the data: Open the workbook in WPS Spreadsheets and select the data range, including the ZIP Code, City, and visit field headers.
  2. 2. Create a PivotTable: Choose Insert > PivotTable, confirm the source range and destination, and create the PivotTable.
  3. 3. Arrange the fields: In the PivotTable field list, place ZIP Code and City in Rows, then place Visit ID or another field populated for every visit in Values.
  4. 4. Set the count: Open the value field settings for the field in Values and select Count.
  5. 5. Chart the results: Select the summarized labels and counts, then choose Insert > Chart and select a suitable chart type.
Group visit records by ZIP code and city without formulasVisualize location counts with a chartOpen and edit Microsoft Excel XLS and XLSX filesUse a familiar spreadsheet interface for free
QA img-9

Frequently Asked Questions

Why does my PivotTable show a sum instead of a count?

Open the field's Value Field Settings in the Values area and select Count instead of Sum.

How do I update the report after adding visits?

Add the records to the source table, then right-click the PivotTable and choose Refresh. The PivotChart updates with the PivotTable.

How can I keep leading zeros in ZIP codes?

Store ZIP codes as text in the source data before creating or refreshing the PivotTable. If zeros were already removed during import, restore them in the source data first.

Will Count include visits with a blank Visit ID?

No. Count ignores blank cells in the selected Values field. Use a field populated for every visit, or fill in missing Visit IDs before refreshing the report.