View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default Custom Sort a Pivot Table (possibly w/ VBA?)

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

" 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