Insert a Pivot Table
To insert a pivot table, execute the following steps.
1. Click any single cell inside the data set.
2. On the Insert tab, in the Tables group, click PivotTable.
The following dialog box appears. Excel automatically selects the data for you. The default location for a new pivot table is New Worksheet.
3. Click OK.
4.A Create PivotTable window should appear. Select the range of data for the pivot table and click on the OK button. In this example, we've chosen cells A1 to F16 in Sheet1 as indicated by Sheet1!$A$1:$F$16.
5.Next, choose the fields to add to the report. In this example, we've selected the checkboxes next to the Order ID and Quantity fields.
6.Next in the Values section, click on the "Sum of Order ID" and drag it to the Rows section.
7.Finally, we want the title in cell A1 to show as "Order ID" instead of "Row Labels". To do this, select cell A1 and type Order ID.
Your pivot table should now display the total quantity for each Order ID as follows: