Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to group and sort a particular data set. I've prepared the data using a QUERY function and using other functions.

Can I order by sum?

This is an example file I created: order by sum

share|improve this question
Something in my web site or project doesn't work. Can I just paste a link to it? – please improve your question. – toscho Aug 30 '13 at 2:59

The best result would be to use the QUERYfunction:

=SORT(QUERY(Data!A1:B6;"select A, sum(B), count(B) group by A");2;FALSE)

Since the sum already has been sorted ascendingly, the FALSE statement in the formula will sort descending using column 2.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.