To create a pivot table in Microsoft Excel 2010 or a newer version, click on any cell in the data set of your current worksheet, open the Insert tab, and click on the Pivot Table button. Once the Pivot Table dialog box appears, select the desired table or data range.
In the Pivot Table dialog box, enter the data range manually in the Table/Range field, or use your mouse pointer to draw a box over the desired data. Select the location where you want Microsoft Excel to create a pivot table by choosing the New Worksheet option or clicking on Existing Worksheet and selecting the location with the mouse pointer. Check the boxes next to the fields that you want to add to the pivot table, and drag them to the Row Labels, Column Labels, Values or Report Filter areas to customize its layout.
Adding a field to the Report Filter area allows you to filter the content of the pivot table by selecting it from the drop-down menu. You can also change the type of calculation in the Total column by right-clicking on it, selecting the Value Field Settings option and choosing the desired calculation type. To sort the values in the pivot tables, select it, open the Options tab, and choose the Ascending or Descending option in the Sort & Filter section.