+ Reply to Thread
Results 1 to 7 of 7

Hiding grand total column in a pivot table using VBA/Macro

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Hiding grand total column in a pivot table using VBA/Macro

    Hi,

    I have the following code to create a pivot table. I want to hide the grand total for rows in the pivot. Can somebody please help m with the code?

    Please Login or Register  to view this content.
    Thanks
    Last edited by Cutter; 08-24-2012 at 02:08 PM. Reason: Added code tags

  2. #2
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Hiding grand total column in a pivot table using VBA/Macro

    Hi Anjana,

    Welcome in Excel Forum.

    Use below code in your macro. You need to modify the the pivot table name in your code.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-20-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Hiding grand total column in a pivot table using VBA/Macro

    I tried that...Its not working!

  4. #4
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Hiding grand total column in a pivot table using VBA/Macro

    Hi,

    Please show me the rectified code. Also let us know where the code is breaking?

  5. #5
    Registered User
    Join Date
    08-20-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Hiding grand total column in a pivot table using VBA/Macro

    Please Login or Register  to view this content.
    Bolded the part where the code is breaking..
    Thak You!

    ---------- Post added at 12:41 PM ---------- Previous post was at 12:40 PM ----------

    I used
    .RowGrand = False
    Was trying out something else and copied that in my previous post.
    Last edited by Cutter; 08-24-2012 at 02:07 PM. Reason: Added code tags

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Hiding grand total column in a pivot table using VBA/Macro

    @ Anjana1811

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  7. #7
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Hiding grand total column in a pivot table using VBA/Macro

    Hi Anjana,

    I think "ObjTable" is not the name of Pivot table. After creating the pivot table chekc the name and let us know.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1