Clément Hurel
Clément Hurel

Reputation: 87

How do I hide the total row in my pivot table?

I'm currently working on a project where I import rows from another excel file into my pivot table. The pivot table include a total row (that can be removed thanks to a checkbox), but I'd like to do it automatically with vba. Do you know a code that could work and remove this row, then add it again as last raw after the importation?

Thank you guys.

Upvotes: 0

Views: 195

Answers (1)

CLR
CLR

Reputation: 12279

Did you not try recording a macro before asking this? I just did this and got the following:

With ActiveSheet.PivotTables("PivotTable1")
    .ColumnGrand = False
    .RowGrand = False
End With

Just tailor this to your sheet and pivot table.

Upvotes: 1

Related Questions