PC Review


Reply
Thread Tools Rate Thread

Custom Sort a Pivot Table (possibly w/ VBA?)

 
 
nikoletos@gmail.com
Guest
Posts: n/a
 
      15th Feb 2008
This is my challenge:

I have a pivot table that has revenue data by vendor (see example
below).

Vendor Revenue
ABC $124
DCE $321
OTHERS $100
FGH $20
XXX $10




I need to sort the data by descening revenue with one exception - I
would like to have vendor "Others" show up at the bottom of the pivot
table (see desired result below). I can do this manual by sorting it
and the dragging field "Others" to the bottom, or right clicking it
and selecting Sort->Move to End.

Vendor Revenue
DCE $321
ABC $124
FGH $20
XXX $10
OTHERS $100




Is there a macro I can create to do this? I tried using a Custom List
and/or a calculated field for this but I could not get the desired
result.

The number of vendors varies by country so the size of the pivot table
is not fixed.

If you need additional information, please let me know.

Thanks,

Nik
 
Reply With Quote
 
 
 
 
David
Guest
Posts: n/a
 
      16th Feb 2008
Copy your Pivot table out and paste it somewhere, give it header labels, then
get rid of any totals you have. You can now sort it. Unless you want to give
it a special sort order, you will have to move "Other" manually

"(E-Mail Removed)" wrote:

> This is my challenge:
>
> I have a pivot table that has revenue data by vendor (see example
> below).
>
> Vendor Revenue
> ABC $124
> DCE $321
> OTHERS $100
> FGH $20
> XXX $10
>
>
>
>
> I need to sort the data by descening revenue with one exception - I
> would like to have vendor "Others" show up at the bottom of the pivot
> table (see desired result below). I can do this manual by sorting it
> and the dragging field "Others" to the bottom, or right clicking it
> and selecting Sort->Move to End.
>
> Vendor Revenue
> DCE $321
> ABC $124
> FGH $20
> XXX $10
> OTHERS $100
>
>
>
>
> Is there a macro I can create to do this? I tried using a Custom List
> and/or a calculated field for this but I could not get the desired
> result.
>
> The number of vendors varies by country so the size of the pivot table
> is not fixed.
>
> If you need additional information, please let me know.
>
> Thanks,
>
> Nik
>

 
Reply With Quote
 
nikoletos@gmail.com
Guest
Posts: n/a
 
      16th Feb 2008
On Feb 16, 10:40*am, David <Da...@discussions.microsoft.com> wrote:
> Copy your Pivot table out and paste it somewhere, give it header labels, then
> get rid of any totals you have. You can now sort it. Unless you want to give
> it a special sort order, you will have to move "Other" manually
>
>
>
> "nikole...@gmail.com" wrote:
> > This is my challenge:

>
> > I have a pivot table that has revenue data by vendor (see example
> > below).

>
> > Vendor * * Revenue
> > ABC * * * * $124
> > DCE * * * * $321
> > OTHERS * *$100
> > FGH * * * * $20
> > XXX * * * * *$10

>
> > *I need to sort the data by descening revenue with one exception - I
> > would like to have vendor "Others" show up at the bottom of the pivot
> > table (see desired result below). I can do this manual by sorting it
> > and the dragging field "Others" to the bottom, or right clicking it
> > and selecting Sort->Move to End.

>
> > Vendor * * Revenue
> > DCE * * * * $321
> > ABC * * * * $124
> > FGH * * * * $20
> > XXX * * * * *$10
> > OTHERS * *$100

>
> > Is there a macro I can create to do this? I tried using a Custom List
> > and/or a calculated field for this but I could not get the desired
> > result.

>
> > The number of vendors varies by country so the size of the pivot table
> > is not fixed.

>
> > If you need additional information, please let me know.

>
> > Thanks,

>
> > Nik- Hide quoted text -

>
> - Show quoted text -


Thanks. I was trying to avoid doing this manual. I did try recording a
macro but I was stuck on the "position= XX" part which moves the field
to the end and depends on the actual number position (bottom, end,
last didn't work).
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to perform custom sort in pivot table vicky Microsoft Excel Programming 0 28th Jan 2010 01:07 PM
Manual sort in a pivot chart/pivot table Isabel Microsoft Excel Charting 4 5th Nov 2009 02:48 PM
top 10, custom, and sort asc./desc. in pivot table Sue Microsoft Excel Misc 1 28th Feb 2008 09:34 PM
Custom sort in a pivot =?Utf-8?B?RGlhbmE=?= Microsoft Excel Worksheet Functions 2 17th May 2004 08:19 PM
Custom Sort order in pivot table jeff Microsoft Excel Misc 1 12th May 2004 10:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:41 AM.