Sorting Data Automatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top