# Excel: How to Create Pie Chart Using Count of Values

Often you may want to create a pie chart in Excel by using a count of values in a particular column.

For example, suppose you have the following dataset that contains information about various basketball players:

Suppose you would like to create a pie chart that shows the count of occurrences for each team name.

The following step-by-step example shows how to do so.

## Step 1: Enter the Data

First, we’ll enter the following dataset into Excel:

## Step 2: Create a List of Unique Values

Next, we’ll use the following formula to create a list of unique team names:

```=UNIQUE(A2:A12)
```

We’ll type this formula into cell D2:

The formula creates a list of unique team names from column A.

## Step 3: Count the Occurrences of Each Value

Next, we’ll type the following formula into cell E2 to calculate the occurrence of each unique team name:

`=COUNTIF(\$A\$2:\$A\$12, D2)`

We’ll then drag this formula down to each remaining cell in column E:

## Step 4: Create the Pie Chart

Lastly, we can highlight the range D2:E5 and then click the Insert tab along the top ribbon, then click the Pie icon within the Charts group:

The following pie chart will automatically be created:

The pie chart shows the count of each unique team name in the dataset.

Feel free to customize the pie chart by adding a title and adding data labels:

The numbers within each pie slice show the count of each team name.

The following tutorials explain how to create other common visualizations in Excel:

May 13, 2024
April 25, 2024
April 19, 2024
April 18, 2024