Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Custom Sort a Pivot Table (possibly w/ VBA?)
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Custom Sort a Pivot Table (possibly w/ VBA?)
On Feb 16, 10:40*am, David 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 " 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Manual sort in a pivot chart/pivot table | Charts and Charting in Excel | |||
custom field with custom formula in pivot table! | Excel Worksheet Functions | |||
top 10, custom, and sort asc./desc. in pivot table | Excel Discussion (Misc queries) | |||
How do I sort pivot table data outside a pivot table | Excel Worksheet Functions | |||
pivot table sort entries that don't yet appear in table | Excel Discussion (Misc queries) |