I am putting together a worksheet to keep track of expenses.  I currently have the following source table called Expenses:     A       B              C           D1  Date    Description    Category    Amount2  1-Jan   Purchase1      Cat1        1.003  3-Jan   Purchase2      Cat1        2.004  5-Jan   Purchase3      Cat2        3.005  7-Jan   Purchase4      Cat2        4.00And a Summary table:     A           B1  Category    Total2  Cat1        3.003  Cat2        7.00The formulas in the Summary table are:A2: =UNIQUE(Expenses!$C$2:$C$5)A3: =CONTINUE(A2, 2, 1)B2: =SUMIF(Expenses!$C$2:$C$5,A2,Expenses!$D$2:$D$5)B3: =SUMIF(Expenses!$C$2:$C$5,A3,Expenses!$D$2:$D$5)What I would like to achieve is sorting the Summary table by the value in column B in decreasing order, but I can't figure out how to get the SUMIF() value in array form to use with SORT().Eventually I hope to have a formula for A2 that looks something like:=SORT(UNIQUE(Expenses!$C$2:$C$5, ***ARRAY_OF_SUMIF_VALUES***, FALSE)I appreciate any and all suggestions.  Thanks.
Sorting Unique rows by a related Sumif column in Google Spreadsheet
google spreadsheets;sorting