

You can get the macro code from the Pivot Table Field Layout Changes page on my Contextures site. selected Value fields have been removed Get the Workbook Here’s the same pivot table, after running the macro.Īll 3 of the selected Value fields have been removed from the pivot table layout by the macro, and the same 3 cells are still selected. In the list of macros, select PivotRemoveValuesSel.At the top of Excel, go to the View tab and click Macros.Next, to remove the selected Value fields, I’ll run the macro named PivotRemoveValuesSel 3 value cells selected Run Macro to Remove Selected Value Fields You don’t need to select cells that are all in the same row. Then, press the Ctrl key, and click on more cells, to select themĪs you can see, the selected cells can be anywhere in the column.First, click on a cell in one column, to select it.In this example, I’ll select a cell in each of the following fields – AvgCost, SubTotal and Discount To remove three of the Value Fields, I’ll start by selecting at least one cell in each field that I want to remove. Click on the link to download sample file 4 – Remove Value Fields.Scroll down to the Get the Sample Files section.Or, on the same page, download the sample Excel workbook, which has the macro in it Copy the code from the web page, and paste it into a regular code module in your workbook.You can get the macro code from the Pivot Table Field Layout Changes page on my Contextures site: To remove the selected Value fields, I’ll use a macro named PivotRemoveValuesSel PivotTable Field List Get the Macro to Remove Selected Value Fields Sometimes you can only see 2 or 3 fields at a time, and you waste time scrolling up and down, looking for a specific field. That way, I won’t have to scroll through the list of fields in the PivotTable Field List, looking for each field, to uncheck it. I could remove the Value fields manually, one at a time, but I’ll use a macro to make this job easier. pivot table which has 5 fields in the Values area Fields in PivotTable Field List

To create a smaller report, I’d like to remove 3 of those value fields, and just leave Qty and Price. In the screen shot shown below, there’s a pivot table which has 5 fields in the Values area

Just select one or more fields, and run the macro! In large pivot tables, with lots of fields, this macro makes it easy to remove specific fields from the Values area. To add or remove fields from the layout, you can check or uncheck fields in the PivotTable Field list. Pivot tables make it easy to work with your data, and see the summaries in different layouts.
