+ Reply to Thread
Results 1 to 4 of 4

A better way to place RowFields in a pivot

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,051

    A better way to place RowFields in a pivot

    There's nothing WRONG, but I wonder if there's a better way. See my code at the bottom, for bringing 7 different fields in my RowFields. Would there be a way to do this with an array of the PivotField names and the count of those names, like (pseudocode):
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I know I'm not stupid, but I suspect I'm a lot stupider than I think I am

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: A better way to place RowFields in a pivot

    Try this (untested)
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,051

    Re: A better way to place RowFields in a pivot

    On the line below I'm getting the error "Unable to get the PivotFields property of the PivotTable class".
    Please Login or Register  to view this content.
    Whoops, my bad: the problem was "Project_ID" vs "ProjectID". Fixing that got your code running spot on. I KNEW there was a way to do it! Thanks so much for your help!
    Last edited by jomili; 04-09-2019 at 12:37 PM.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: A better way to place RowFields in a pivot

    You're welcome. Glad I can offer some help.

+ 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. VBA code to place pivot table in next available row
    By Pr0x1mo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2017, 01:52 PM
  2. Pivot Table Subtotals for Rowfields
    By wellen72 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2016, 03:27 PM
  3. [SOLVED] Pivot Table Multiple RowFields Problems
    By Phixer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2015, 01:10 PM
  4. Pivot Table Rowfields - Values - Email.
    By sarndt01 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2013, 11:49 PM
  5. [SOLVED] DataFields and RowFields not appearing in PT
    By BobBlooms in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2012, 04:31 AM
  6. Pivot Tables: Loop thru RowFields within RowFields
    By davidjones in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2012, 09:22 PM
  7. [SOLVED] Default Value to Zero in Pivot Tables:Is there such a place?
    By Cheryl B. in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-05-2005, 01:05 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