askvity

How to Pivot in Excel?

Published in Excel PivotTables 3 mins read

To pivot in Excel, you need to create a PivotTable, which summarizes and reorganizes selected data. Here's how:

Steps to Create a PivotTable

  1. Select Your Data: Begin by selecting the range of cells containing the data you want to analyze. Ensure your data has column headers.

  2. Insert PivotTable: Go to the "Insert" tab on the Excel ribbon and click on "PivotTable."

  3. Choose Your Data Source:

    • A dialog box will appear with "Choose the data that you want to analyze."
    • "Select a table or range" should already be selected.
    • In the "Table/Range" field, verify the cell range you selected is correct. Excel usually automatically detects the data range. If not, manually select the range.
  4. Choose Where to Place the PivotTable:

    • Under "Choose where you want the PivotTable report to be placed," select either:
      • New Worksheet: Creates a new sheet to house the PivotTable. (Recommended for cleaner organization)
      • Existing Worksheet: Places the PivotTable on the current sheet. You'll need to specify a cell where the top-left corner of the PivotTable will be.
  5. Click "OK": This will create the blank PivotTable and open the "PivotTable Fields" pane on the right side of the screen.

Using the PivotTable Fields Pane

The "PivotTable Fields" pane is where you control how your data is summarized and displayed. It contains two sections:

  • Field List: This shows all the column headers from your original data.
  • Areas: This is where you drag and drop your fields to structure the PivotTable. The areas are:
    • Filters: Allows you to filter the entire PivotTable based on specific criteria.
    • Columns: Displays the selected field as column headers.
    • Rows: Displays the selected field as row labels.
    • Values: Contains the numerical data that will be summarized (e.g., sum, average, count).

Example: Creating a Sales Summary

Let's say you have a table with columns like "Product," "Region," and "Sales."

  1. Drag "Product" to the "Rows" area. This will list all your products down the left side of the PivotTable.
  2. Drag "Region" to the "Columns" area. This will display your regions across the top of the PivotTable.
  3. Drag "Sales" to the "Values" area. By default, Excel will sum the sales for each product and region combination.

You can then modify the summary function in the "Values" area (e.g., change from "Sum" to "Average," "Count," etc.). Just click on the field name in the "Values" area, select "Value Field Settings," and choose your desired function.

Key Considerations

  • Data Structure: Ensure your data is in a tabular format (rows and columns) with clear headers.
  • Refresh: If you modify the source data, you'll need to refresh the PivotTable by right-clicking inside it and selecting "Refresh."
  • Experimentation: PivotTables are very flexible. Don't hesitate to experiment with different field placements to gain different insights from your data.

Related Articles