# How to sort Monthly budget sheet by budgeted amount

**URL:** <https://community.tiller.com/t/how-to-sort-monthly-budget-sheet-by-budgeted-amount/30987>\
**Category:** Google Sheets\
**Created:** [March 4, 2025, 5:22am UTC](https://community.tiller.com/t/how-to-sort-monthly-budget-sheet-by-budgeted-amount/30987 "2025-03-04T05:22:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tAMG20](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tiller.com/tamg20/32/20483_2.png) [@tAMG20](https://community.tiller.com/u/tAMG20)\
**Post date:** [March 4, 2025, 5:22am UTC](https://community.tiller.com/t/how-to-sort-monthly-budget-sheet-by-budgeted-amount/30987/1 "2025-03-04T05:22:23Z")

</div>

Hello,  
I would like to sort the monthly budget sheet such that the highest budgeted amount is first, rather than in alphabetical order. I tried modifying another post that sorted by amount spent but couldn’t quite get the scripting just right. Thanks!

---

<div class="post-metadata">

**Author:** ![Mark.S](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tiller.com/mark.s/32/14650_2.png) [@Mark.S](https://community.tiller.com/u/Mark.S)\
**Post date:** [March 4, 2025, 6:42pm UTC](https://community.tiller.com/t/how-to-sort-monthly-budget-sheet-by-budgeted-amount/30987/2 "2025-03-04T18:42:12Z")

</div>

I believe you are referring to [this other post](https://community.tiller.com/t/monthly-budget-organize-categories-by-amount-spent/24223/2).

Modifying what was suggested there, how about this for sorting by budget amount?

Monthly Budget sheet, cell `Q16` :

```auto
={query(
   {INDIRECT(K21),INDIRECT(K20),INDIRECT(K19),INDIRECT(K22),ARRAYFORMULA(XLOOKUP(INDIRECT(K19),Z16:Z,AA16:AA,0,0,1))},
   "select Col1, Col2, Col3 where Col1 = 'Income' and Col4 <> 'Hide' order by Col2 asc, Col5 desc, Col3 asc",0);
  query(
   {INDIRECT(K21),INDIRECT(K20),INDIRECT(K19),INDIRECT(K22),ARRAYFORMULA(XLOOKUP(INDIRECT(K19),Z16:Z,AA16:AA,0,0,1))},
   "select Col1, Col2, Col3 where Col1 = 'Expense' and Col4 <> 'Hide' order by Col2 asc, Col5 desc, Col3 asc",0)}

```

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tiller.com/randy/32/16_2.png) [@randy](https://community.tiller.com/u/randy)\
**Post date:** [March 5, 2025, 5:28pm UTC](https://community.tiller.com/t/how-to-sort-monthly-budget-sheet-by-budgeted-amount/30987/3 "2025-03-05T17:28:53Z")

</div>

Thanks for the quick solve, @Mark.S. Did this work for you, @tAMG20?

Remember that if you restore or update the Monthly Budget this (and other) formula modifications will be overwritten.

---

<div class="post-metadata">

**Author:** ![tAMG20](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tiller.com/tamg20/32/20483_2.png) [@tAMG20](https://community.tiller.com/u/tAMG20)\
**Post date:** [March 10, 2025, 5:09am UTC](https://community.tiller.com/t/how-to-sort-monthly-budget-sheet-by-budgeted-amount/30987/4 "2025-03-10T05:09:00Z")

</div>

This worked great, thank you!!
