+ Reply to Thread
Results 1 to 2 of 2

VBA for pivot table won't group fields

  1. #1
    Registered User
    Join Date
    11-07-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2013
    Posts
    4

    VBA for pivot table won't group fields

    My macro creates a pivot table but I am running into an issue when it goes to group one of the numeric columns as I get a "Group method of Range class failed" message. The grouping portion of the code is from a recorder. The rest of the code not shown attempts to group three other fields and then finish out. Any thoughts on how to fix this?

    Also, I have to create this report weekly so it's a new one each week. Do you see any code issues with the creation of the table? I've noticed that the pivot table # changes each time it gets created so I'm wondering if I need to be more exact? Sorry if that second question is too vague. Thanks!


    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    11-07-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: VBA for pivot table won't group fields

    I was able to figure this out. Here is the code.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Collapse/Expand - Pivot table Fields - Need equivalent option in Excel VBA Pivot table
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2012, 03:00 PM
  2. Replies: 1
    Last Post: 04-25-2011, 01:17 PM
  3. Hiding Specific Fields on Pivot Table Fields
    By branco in forum Excel General
    Replies: 7
    Last Post: 03-26-2010, 09:39 AM
  4. How to Disable automatic fields in pivot table like total and count on fields
    By anushka in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-24-2009, 07:53 AM
  5. Differentiate between column fields and data fields in a pivot table
    By whiteheadw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2009, 01:59 PM

Tags for this Thread

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