0
0
Excelspreadsheet~8 mins

Custom sorting rules in Excel - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Custom sorting rules
Dashboard Goal

Sort a list of products by a custom priority order instead of alphabetical or numeric order.

Sample Data
ProductCategoryPrice
BananaFruit0.5
CarrotVegetable0.3
AppleFruit0.7
BroccoliVegetable1.2
OrangeFruit0.6
PotatoVegetable0.4
StrawberryFruit1.5
Dashboard Components
  • Custom Sort Order Table: A small table listing categories in the desired order.
    A10:A11 contains: Fruit, Vegetable
  • Helper Column for Sort: In D2, formula:
    =MATCH(B2,$A$10:$A$11,0)
    This finds the category's position in the custom order list.
    Drag down to D8.
  • Sorted Product List: Use SORTBY formula to sort by custom order and then by price ascending.
    In F2, formula:
    =SORTBY(A2:C8, D2:D8, 1, C2:C8, 1)
    This sorts products first by category order (Fruit first, then Vegetable), then by price low to high.
Dashboard Layout
+----------------------+-----------------------+
| Custom Sort Order     | Sorted Product List   |
| (A10:A11)            | (F2:H8)               |
+----------------------+-----------------------+
| Sample Data          | Helper Column (hidden) |
| (A1:C8)              | (D2:D8)                |
+----------------------+-----------------------+
Interactivity

Change the order of categories in the custom sort order table (cells A10:A11). The helper column updates automatically. The sorted product list updates to reflect the new category priority.

Self Check

If you change the custom sort order to have Vegetable first and Fruit second in A10:A11, which product category appears first in the sorted product list?

Key Result
Sort products by a custom category order and then by price ascending.