How to Remove Grand Total from Pivot Table (4 Quick Ways)

We’ll consider the following dataset in B4:D14 cells which shows the Item names, their Category, and the Sales in USD.

Dataset


Method 1 – Using the Design Tool to Remove the Grand Total from a Pivot Table

Steps:

  • Select the dataset (B4:D14 cells), go to the Insert tab, and click the PivotTable button.

Inserting Pivot Table

The PivotTable from table or range wizard appears.

  • Check the New Worksheet option and press OK.

How to Remove Grand Total from Pivot Table Using Design Tool

This opens the PivotTable Fields pane on the right.

  • Drag the Category and Sales fields into the Rows and Values fields, respectively.

How to Remove Grand Total from Pivot Table Using Design Tool

  • Click anywhere in the pivot table and select the Design tool.

How to Remove Grand Total from Pivot Table Using Design Tool

  • Press the Grand Totals drop-down and choose the Off for Rows and Columns option.

How to Remove Grand Total from Pivot Table Using Design Tool

The grand total has been removed from the pivot table.

How to Remove Grand Total from Pivot Table Using Design Tool


Method 2 – Using the Remove Grand Total Option

Steps:

  • Select the dataset (B4:D14 cells), move to the Insert tab, then click the PivotTable button.

This opens the PivotTable from table or range dialog box.

  • Check the New Worksheet option and click the OK button.

Inserting Pivot Table

  • Drag the Category and Sales fields into the Rows and Values fields, respectively.

How to Remove Grand Total from Pivot Table Using Remove Grand Total option

  • Select the Grand Total (B9:C9 cells) and right-click on them, then choose the Remove Grand Total option.

How to Remove Grand Total from Pivot Table Using Remove Grand Total option

Your result should look like the image given below.

How to Remove Grand Total from Pivot Table Using Remove Grand Total Option


Method 3 – Utilizing PivotTable Options to Remove the Grand Total

Steps:

  • Generate the pivot table.
  • Select anywhere in the pivot table.
  • Right-click and select the PivotTable Options.

Using PivotTables Options

A PivotTable Options wizard pops up.

  • Choose the Totals and Filters tab.
  • Uncheck the Show grand totals for rows and Show grand totals for columns options.
  • Press OK.

How to Remove Grand Total from Pivot Table Using PivotTables Options

Your output should appear as the picture shown below.

How to Remove Grand Total from Pivot Table Using PivotTables Options


Method 4 – Applying VBA Code to Remove the Grand Total from a Pivot Table


Step 1 – Open the Visual Basic Editor

  • Navigate to the Developer tab and select Visual Basic.

Inserting VBA Code

This opens the Visual Basic Editor in a new window.


Steo 2 – Insert VBA Code

  • Go to the Insert tab and select Module.

How to Remove Grand Total from Pivot Table Applying VBA Code

  • Copy the code from here and paste it into the window as shown below.
Option Explicit
Sub CreatePivotTable()

Dim pvt_tab As PivotTable
Dim pvt_cache As PivotCache

Sheet1.Activate

Set pvt_cache = ActiveWorkbook.PivotCaches.Create(xlDatabase, Range("B4").CurrentRegion)

Sheets.Add , Sheets(Sheets.Count)

Set pvt_tab = ActiveSheet.PivotTables.Add(pvt_cache, Range("B4"), "Sales_Pivot")

pvt_tab.PivotFields("Category").Orientation = xlRowField
pvt_tab.PivotFields("Sales").Orientation = xlDataField

pvt_tab.ColumnGrand = False
pvt_tab.RowGrand = False

End Sub

How to Remove Grand Total from Pivot Table Applying VBA Code

Code Breakdown:

  • We give the sub-routine a name,
  • We define the variables.
  • We activate Sheet1 using the Activate method, and the memory cache is assigned using the PivotCache object.
  • In the second portion, we insert the PivotTable in a new sheet with the Add method.
  • We position the PivotTable in the preferred (B4) cell and give it a name. In this case, we’ve named it Sales_Pivot.
  • We add the Pivot Fields i.e. the Category in the RowField and Sales in the DataField.
  • We set the ColumnGrand and the RowGrand properties to False.

Code Explanation


Step 3 – Running VBA Code

  • Close the VBA window and click the Macros button.

This opens the Macro dialog box.

  • Click the Run button.

How to Remove Grand Total from Pivot Table Applying VBA Code

The results should look like the screenshot given below.

How to Remove Grand Total from Pivot Table Applying VBA Code


Remove the Column Grand Total from a Pivot Table

Steps:

  • Select the dataset (B4:D14 cells).
  • Move to the Insert tab, click the PivotTable button.
  • Check the New Worksheet option and hit OK.

Inserting Pivot Table

  • Drag the Item, Category, and Sales fields into the Rows, Columns, and Values fields, respectively.

How to Remove Column Grand Total from Pivot Table

  • Click anywhere in the pivot table, navigate to the Design tool, press the Grand Totals option, and choose On for Rows Only.

How to Remove Column Grand Total from Pivot Table

This removes the column grand total from the pivot table as shown in the screenshot below.

How to Remove Column Grand Total from Pivot Table

Read More: [Fixed!] Pivot Table Grand Total Column Not Showing


Remove the Row Grand Total from a Pivot Table

Steps:

  • Insert the pivot table as shown in the previous method.
  • Select any cell in the pivot table, go to the Design tool, click the Grand Totals drop-down, and select On for Columns Only.

How to Remove Row Grand Total from Pivot Table

The row grand total has been removed from the pivot table.

How to Remove Row Grand Total from Pivot Table


Things to Remember

  • When using the VBA code, make sure to enter the correct sheet name. In this case, Sheet1 contains the dataset hence we’ve written Sheet1.Activate command.

VBA Code

  • If you change the name to, for instance, Dataset.Activate, you’ll get an error as shown in the screenshot below.

VBA Code


Practice Section

We have provided a Practice section on the right side of each sheet so you can practice yourself.

Practice Section


Download the Practice Workbook


Related Articles


<< Go Back to Pivot Table Grand Total | Pivot Table in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Eshrak Kader
Eshrak Kader

Eshrak Kader is a dedicated professional with a BSc. Degree in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology. He boasts a rich background in Microsoft Office Suite, and over the past year, he has authored over 120 insightful articles for the ExcelDemy. Currently, Eshrak leads a team of 5 in the ExcelDemy Video project and enjoys problem-solving and making videos on Excel. Eshrak’s passion for continuous learning underscores his commitment to excellence in... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo