+ Reply to Thread
Results 1 to 3 of 3

VBA Pivot Tables? One field as legend and value?

  1. #1
    Registered User
    Join Date
    09-08-2014
    Location
    Newport, Wales
    MS-Off Ver
    2013
    Posts
    2

    Question VBA Pivot Tables? One field as legend and value?

    Just wondering if someone could link to an example of VBA code where one column from the original data table is used as a legend, and again as a count in the pivot, generated by VBA.

    I've tried recording it, and coding it, but keep getting stuck with the same problem - it will add the column as a legend in the pivot table, but once added as a count in the value field, it removes it as the legend.

    Odd that you can do it manually, but struggle to do it via VBA - or I'm missing something quite simple (most probably the latter).
    Would be appreciative of any pointers you might have.

    Ta,

    Oracus
    Last edited by Oracus; 09-09-2014 at 11:55 AM.

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: VBA Pivot Tables? One field as legend and value?

    You must add data field first:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Registered User
    Join Date
    09-08-2014
    Location
    Newport, Wales
    MS-Off Ver
    2013
    Posts
    2

    Re: VBA Pivot Tables? One field as legend and value?

    That's done it - Thank you!!

+ 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. Hiding field and part of a field in pivot tables
    By darq in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-23-2013, 02:45 PM
  2. Replies: 5
    Last Post: 12-18-2012, 11:37 AM
  3. Replies: 2
    Last Post: 08-16-2010, 06:40 PM
  4. Replies: 1
    Last Post: 04-12-2010, 01:01 PM
  5. [SOLVED] pivot tables:calculated field
    By mariagloria in forum Excel General
    Replies: 2
    Last Post: 02-28-2005, 06:06 PM

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