To move columns in a pivot table, you simply drag and drop the field names within the PivotTable Fields pane or manually drag the column headers directly within the spreadsheet. This allows you to change the hierarchy of your data, switch between row and column views, or reorder categories to make your report more intuitive.
Rearranging your pivot table is essential for data storytelling. By moving a field from the "Columns" area to the "Rows" area, for example, you can transform a wide, horizontal report into a long, vertical list, which is often easier to read and print. Before you begin, ensure your data source is clean and that you have a designated area of your spreadsheet available for the table to expand as you move fields around.
What You'll Need
- A spreadsheet application (such as Microsoft Excel or Google Sheets).
- An existing Pivot Table already created from a data source.
- Access to the PivotTable Fields pane (the sidebar that appears when you click inside the table).
Step-by-Step
Depending on whether you want to change the type of data in the columns or the order of the columns, follow the corresponding method below. Note that menu labels may differ slightly based on your software version or region.
Method 1: Using the Fields Pane (Best for Structural Changes)
- Click anywhere inside your pivot table to activate the PivotTable Fields pane on the right side of the screen.
- Locate the Columns quadrant at the bottom of the pane.
- To move a field out of the columns: Click and hold the field name in the Columns area, then drag it into the Rows, Filters, or Values area.
- To change the order of multiple columns: If you have several fields in the Columns area, click and drag them up or down within that specific box. The field at the top of the list creates the primary grouping, while fields below it create nested sub-columns.
- Release the mouse button to apply the change. The pivot table will automatically refresh to reflect the new layout.
Method 2: Dragging Column Headers (Best for Quick Reordering)
- Identify the column header you wish to move within the actual spreadsheet grid.
- Hover your mouse over the edge of the cell containing the column label until the cursor changes to a move icon (usually a four-headed arrow or a hand).
- Click and hold the left mouse button.
- Drag the column to the left or right until a thick indicator line appears between the existing columns.
- Release the mouse button to drop the column into its new position.
Method 3: Moving Data from Rows to Columns
- In the PivotTable Fields pane, find the field currently located in the Rows area.
- Click and drag that field upward into the Columns area.
- Observe how the table pivots; the data that was previously listed vertically will now spread horizontally across the top of the table.
Common Mistakes
- Dragging into the wrong quadrant: Accidentally dropping a column field into the "Values" area will change it from a category label to a numerical calculation (like a Sum or Count), which completely alters the table's meaning.
- Over-nesting columns: Adding too many fields to the Columns area can make the table excessively wide, forcing you to scroll horizontally for long distances and making the data difficult to analyze.
- Confusing sorting with moving: Trying to move a column to change the alphabetical order of the data. To change the order of the items within a column, use the Sort feature rather than dragging the field in the pane.
- Moving fields in a filtered table: Attempting to move columns while a complex filter is active can sometimes make it difficult to see where the data is landing. It is often easier to clear filters before rearranging the structure.
Tips
- Use the "Rows" area for long lists: If you have more than 5-10 unique items in a category, move that field to the Rows area. Spreadsheets are naturally designed for vertical scrolling, not horizontal.
- Create a hierarchy: Place your most general category (e.g., "Year") at the top of the Columns list and your most specific category (e.g., "Month") below it. This creates a clean, nested look.
- Toggle Layouts: If the table looks cluttered after moving columns, look for the "Design" tab in your ribbon and experiment with "Report Layout" options (such as Tabular Form) to see which one fits your new column structure best.
Troubleshooting
If the columns are not moving as expected, try these steps in order:
- Check for Protected Sheets: If you cannot drag fields or headers, check if the worksheet is protected. Go to the Review tab and select "Unprotect Sheet" if necessary.
- Refresh the Pivot Table: Sometimes the visual layout lags. Right-click anywhere in the table and select Refresh to force the software to redraw the columns.
- Verify the Field Pane is Visible: If the sidebar has disappeared, right-click inside the pivot table and select Show Field List.
- Check for Merged Cells: Pivot tables generally do not allow merged cells within the data area. If you have manually merged cells around the pivot table, it may interfere with the ability to drag and drop headers. Unmerge these cells and try again.
Frequently Asked Questions
Can I move columns in a pivot table using a keyboard shortcut?
There is no direct keyboard shortcut to "drag" a column. You must use the mouse to move fields in the pane or headers in the grid. However, you can use the Tab and Arrow keys to navigate to the field and use the menu options to remove and re-add fields.
Why does moving a column change my totals?
Moving a field doesn't change the underlying data, but it changes how the totals are aggregated. For example, moving a field from "Columns" to "Filters" will remove the column-specific subtotals and replace them with a single total for the filtered selection.
Can I move a column to a completely different sheet?
No, you cannot move a single column of a pivot table to another sheet while keeping it linked as part of the same pivot table. You would need to create a second pivot table on the other sheet using the same data source.
Will moving columns break my formulas?
If you are using the GETPIVOTDATA function, your formulas should remain intact because that function looks for the field name rather than the cell coordinates. If you are using standard cell references (e.g., =B5), those formulas will likely break or point to the wrong data when columns move.
How do I move a column to the very beginning of the table?
In the PivotTable Fields pane, drag the desired field to the very top of the "Columns" or "Rows" list. This ensures it becomes the primary axis of the table, placing it furthest to the left (for rows) or top (for columns).