Sort From Highest to Lowest

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
923
Office Version
  1. 365
Hi,

I have the following input table:

Expense Tracker_Test.xlsx
BCD
7DateExpenseAmount (INR)
8Saturday, 29 October, 2022Incense500
9Sunday, 30 October, 2022Biscuit300
10Sunday, 30 October, 2022Book200
11Tuesday, 1 November, 2022Breakfast100
12Wednesday, 2 November, 2022Internet200
13Saturday, 5 November, 2022Donation600
Expense Journal
Cells with Data Validation
CellAllowCriteria
B8:B356List=Date
C8:C470List=Expense1


On another sheet, I am trying to summarize the expenses based on category and by highest amount to lowest automatically as the expenses details are being entered:

Expense Tracker_Test.xlsx
BCD
2Expense CategoryAmount RMAmount INR
3Biscuit30017
4Book20011
5Breakfast1006
6Donation60034
7Incense50028
8Internet20011
Summary
Cell Formulas
RangeFormula
B3:B8B3=SORT(UNIQUE(FILTER('Expense Journal'!C8:C362,'Expense Journal'!C8:C362<>"")))
C3:C8C3=IF(B3=0,"",SUMIF('Expense Journal'!$C$8:$C$350,Summary!B3,'Expense Journal'!$D$8:$D$350))
D3:D8D3=IF(B3=0,"",SUMIF('Expense Journal'!$C$8:$C$350,Summary!B3,'Expense Journal'!$E$8:$E$350))
Dynamic array formulas.


However, as per the table above, the amount is not sorted by highest to lowest automatically. Is there a way to accomplish this ?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
sort('Expense Journal'!C8:D362,2,-1)

where the amount INR come from
Book2
ABCDEF
1DateExpenseAmount (INR)
244863Incense500Donation600
344864Biscuit300Incense500
444864Book200Biscuit300
544866Breakfast100Book200
644867Internet200Internet200
744870Donation600Breakfast100
Sheet1
Cell Formulas
RangeFormula
E2:F7E2=SORT(B2:C7,2,-1)
Dynamic array formulas.
 
Upvote 0
Solution
Hi etaf,

Thank you.

Is there a way to accomplish the result by referencing directly the first table (the expense input table) instead of the second table (summary table) ?
 
Upvote 0
sorry, not sure what you mean the tables look similar
i used expense journal -

and kepp in same sheet for simplcity - but you can add a sheet name
 
Upvote 0
Hi etaf,

My apologies. The solution worked. Thank you for your patience and have a great day ahead. 🙏
 
Upvote 0

Forum statistics

Threads
1,215,730
Messages
6,126,528
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top