+ Reply to Thread
Results 1 to 2 of 2

VBA code to sort pivot table's Grand Total column based on cell.row.value

  1. #1
    Registered User
    Join Date
    10-16-2018
    Location
    Cumming, GA
    MS-Off Ver
    2016
    Posts
    9

    VBA code to sort pivot table's Grand Total column based on cell.row.value

    I hope someone can help me with this. I've searched and searched but can't find any help on this topic. I have a Sales pivot table with the following Rows:

    Sales_Rep\Customer\Last_Date\Year

    Capture.PNG

    This data reports back to 2016 for most customers (but not all). I want to show Sales_Reps in descending order based on their 2018 Grand Totals.
    Within each Sales_Rep, I want to show Customers in descending order based on their 2018 Grand Total.

    I have tried using the 'more sort options' Descending (Z to A) by 'Sum of Revenue' and 'more options' with AutoSort marked and Sort By Values in selected column $Q$10 (which is the column where row where year = 2018).

    This does not produce the desired results. I'm guessing that a VBA code would be the best way to produce the results I'm looking for but I don't know how. Can anyone please help me out here?

    Thank you.
    Marlene

    Excel version 2013

  2. #2
    Registered User
    Join Date
    10-16-2018
    Location
    Cumming, GA
    MS-Off Ver
    2016
    Posts
    9

    Re: VBA code to sort pivot table's Grand Total column based on cell.row.value

    Can anyone please help? I'm trying to sort in descending order on year = 2018

+ 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. Need to sort grand total by quantity on pivot table
    By iracknback in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-24-2017, 12:19 PM
  2. Adding a formula column based on the pivot table's Grand Total column
    By trisoldee in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-26-2014, 05:29 PM
  3. Specifying one column in the grand total row in a pivot table
    By Phixer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-12-2014, 12:35 PM
  4. Pivot Table (Need :- % of Grand Total Column)
    By sam99 in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 12-20-2013, 03:56 AM
  5. Pivot Table - Grand Total not the sum of the column
    By Harrold in forum Excel General
    Replies: 2
    Last Post: 10-25-2011, 11:23 AM
  6. Pivot-Sort by Grand Total column
    By jomili in forum Excel General
    Replies: 2
    Last Post: 05-10-2011, 08:34 AM
  7. pivot table and % on grand total column only
    By Mm73 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-02-2007, 09:41 AM

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