How to Create Pivot Table from Multiple Sheets in Google Sheets
Creating a pivot table from multiple sheets in Google Sheets requires you to first consolidate your data into a single sheet. Once you have your data in one place, you can create a pivot table to help you analyze and summarize the data more efficiently. Here's how you can do it:
Step 1: Combine data from multiple sheets into a single sheet
- Create a new sheet in your Google Sheets workbook where you want to consolidate your data.
- In the first cell of the new sheet, type the following formula:
Replace={Sheet1!A1:C; Sheet2!A2:C}
Sheet1
andSheet2
with the names of the sheets you want to combine, andA1:C
with the range of the data you want to include from each sheet. The semicolon (;
) in the formula means to stack the data from each sheet vertically. - Press Enter to apply the formula. Your data from the specified sheets and ranges will now be combined in the new sheet.
Step 2: Create a pivot table from the consolidated data
- Select a cell in the consolidated data sheet.
- Click on "Data" in the menu bar and choose "Pivot table."
- In the "Create pivot table" dialog box, the range will be pre-filled with the data you selected. You can adjust the range if needed.
- Choose whether you want the pivot table to appear in a new sheet or an existing sheet.
- Click "Create" to create the pivot table.
Step 3: Customize your pivot table
- In the pivot table editor on the right side of the screen, you can add rows, columns, values, and filters to customize your pivot table according to your needs.
- Drag and drop the fields from the "Available fields" section to the corresponding areas (Rows, Columns, Values, Filters) to create your desired pivot table layout.
- Adjust the settings for each field by clicking on the drop-down arrow next to the field name.
Example:
Example: Sales data from two stores
Let's say we have sales data from two stores in different sheets named "Store_A" and "Store_B". We want to create a pivot table to analyze the total sales by product and store.
Step 1: Combine data from Store_A and Store_B sheets
- Create a new sheet named "Combined_Data."
- In cell A1 of "Combined_Data" sheet, enter the formula:
This will combine the data from both sheets, excluding the header row from the second sheet.={Store_A!A1:E; Store_B!A2:E}
Step 2: Create a pivot table from Combined_Data
- Select a cell in the "Combined_Data" sheet.
- Click on "Data" in the menu bar and choose "Pivot table."
- The range should be pre-filled with the combined data. Choose where you want the pivot table to appear and click "Create."
Step 3: Customize the pivot table
- In the pivot table editor, drag "Product" to the Rows section.
- Drag "Store" to the Columns section.
- Drag "Sales" to the Values section and choose "Sum" as the aggregation type.
- Now, your pivot table will display the total sales by product and store.
Did you find this useful?