Sorting Data Automatically

S

Sabunabu

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?
 
W

William Horton

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.
 
M

Martin P

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.
 
Top