ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sorting Data Automatically (https://www.excelbanter.com/excel-worksheet-functions/63083-sorting-data-automatically.html)

Sabunabu

Sorting Data Automatically
 
I have a sheet with names and corresponding sales data. Every month, the
numbers (sales data) changes and I would like to set up a sort function that
ranks the names/data in order as the sales data changes. I know you can do
this manually but is there a way of performing this sort automatically?

William Horton

Sorting Data Automatically
 
Having the users choose Data / Sort from the Excel menu path doesn't seem to
manual to me. However, you could put a button on the worksheet, and have
that button fire off a macro that would do the sort for you. Another way
would be to have a pivot table run off your source data. Everytime you
refresh the pivot table the data will be sorted in whatever way you have
formatted the pivot table to sort.

"Sabunabu" wrote:

I have a sheet with names and corresponding sales data. Every month, the
numbers (sales data) changes and I would like to set up a sort function that
ranks the names/data in order as the sales data changes. I know you can do
this manually but is there a way of performing this sort automatically?


Martin P

Sorting Data Automatically
 
Let cells A2 to A5 contain the names and cells B2 to B5 the sales.
Cell C2:=B2+ROW()/1000
Cell D2:=RANK($C2,$C$2:$C$5)
Cell E2:=ROW()-1
Cell F2:=MATCH(E2,$D$2:$D$5,0)
Cell G2:=INDEX($A$2:$A$5,$F2)
Cell H2:=INDEX($B$2:$B$5,$F2)
Copy cells C2 to H2 down.

"Sabunabu" wrote:

I have a sheet with names and corresponding sales data. Every month, the
numbers (sales data) changes and I would like to set up a sort function that
ranks the names/data in order as the sales data changes. I know you can do
this manually but is there a way of performing this sort automatically?



All times are GMT +1. The time now is 10:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com