Sort function?

P

Phil

Excel does not appear to have a sort function.:-(

I can use the Sort option from the Data menu, but this has two major
problems:
1) The sort is only done once. If the data change, they don't stay
sorted.
2) If the data are calculated using a formula, sort doesn't work.

Any suggestions on the best way around this?
What I'm actually trying to do is create a workbook with various
calculations in. I just want people to be able to put their own data in the
first column, and have another column somewhere display the results of the
calculations (which involve sorting the data along the way).

If there was a sort function, this would be easy. For example I could put a
formula in cells B2:B5 something like =SORT(A2:A5). I expect I could write
such a function in VBA, but if anyone has any better ideas, or some code
that's already been written that would be very much appreciated.

Phil.
 
R

rdwj

Phil,
have a look at the RANK formula. Together with MATCH and Offset you can
create a function based sort. Offset(Match(Rank()))

rdwj
 

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

Top