+ Reply to Thread
Results 1 to 3 of 3

How to Show Multiple Data Fields in Columns in a Pivot Table?

  1. #1
    Registered User
    Join Date
    08-24-2010
    Location
    California
    MS-Off Ver
    Excel 2007, 2010
    Posts
    45

    How to Show Multiple Data Fields in Columns in a Pivot Table?

    I currently have two data fields that I'd like to show in columns in a pivot table. When I generate the table, however, they always show in rows on top of each other for each row field values. Could someone please let me know what properties I need to set in order to see them in columns? Thank you in advance for your help!

    Please below see code and screenshot of what I want and what I currently have:

    Here is what I need: TempQuestion.JPG

    The code below works in creating the pivot table, but I'm not sure why they data fields are not in columns:
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: How to Show Multiple Data Fields in Columns in a Pivot Table?

    My best guess is that you should change the .Orientation setting from xlDataField to be xlColumnField. Give that a go

  3. #3
    Registered User
    Join Date
    08-24-2010
    Location
    California
    MS-Off Ver
    Excel 2007, 2010
    Posts
    45

    Re: How to Show Multiple Data Fields in Columns in a Pivot Table?

    Hi Mallycat -

    Thank you for the suggestion! I just tried setting them to xlColumnField. The result is: 1 - you won't be able to use the .Function = xlSum property anymore, and 2 - All of the rows in display disappeared - I was left with an empty table with two column headers on the top, probably because the Column Fields are actually some kind of "category" like the Row fields.

    On the screen, I can always drag the two fields into the "Sum Values" box and make them data fields in columns. However, I cannot figure out how to do it programmatically.

    m3atball

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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