Friday, March 18, 2011

How to sort pivot table by value ?

Hi,

I have a block of excel data (Excel 2003) which contains client name, client a/c number, month and value.

I want to create a pivot with a/c number and client name for rows, months 1-12 as column heading and grand total for rows and columns.

So far, no problem, but I want the rows sorted not by a/c number or name, but by grand total of rows, so client with highest total for year is first in table, and client with lowest total is last.

Any ideas how to achieve this ?

Thanks for reading.

Reply 1 : How to sort pivot table by value ?

1. Copy the contents of the table to the clipboard.
2. Copy/paste values to another sheet
3. Sort the table on that other sheet.

You might like to record or write a macro to automate all of this.

Kees

Reply 2 : How to sort pivot table by value ?

I was hoping for a method that was 100% automatic, as each new months data is added, and the table refreshed, it would always have the highest value as the first row etc.

I tried adding 'Value' as the first field, as well as being the data field. This worked as long as no client had more than value, but as soon as they have values in two or more months, you get multiple rows for the same client.

Reply 3 : How to sort pivot table by value ?

arrow for the row label or name column ...click on 'More sort options'.....then click on 'Sort Ascending' or 'Sort descending', then select by count or sum of records.

If you add entries within the original spreadsheet rows...then update/refresh the pivot table should work like I think you want it.

Let us know.

VAPCMD

No comments:

Post a Comment