Forum Discussion
Retiredtrialjudge
Oct 18, 2022Copper Contributor
Sorting with following items
There is probably an easy way to do this, but I can't find/figure it out. I want to go shopping to the Grocers, Wal Mart, and the Pharmacy. I have several items to get at each place. So I e...
Lorenzo
Oct 18, 2022Silver Contributor
There is probably an easy way to do this... Not really. Recording data as you do causes challenges when it comes to sorting, grouping, suming...
Attached is a Power Query option with your data in columns A-B formated as Table (Header Row isn't displayed). On sheet SORTED, the same as above, Sorted by [Shop]
When you add data to your Shopping list > Switch to SORTED > Right-click somewhere in Column A-B > Refresh
Retiredtrialjudge
Oct 18, 2022Copper Contributor
Thanks LZ!!!
- LorenzoOct 18, 2022Silver Contributor
Another option if you run Excel 365. With your data in Table named ShoppingList (as previously shared):
=LET( FillShop, SCAN(,ShoppingList[Shop], LAMBDA(seed,shop, IF(shop <> "", shop, seed)) ), StackData, HSTACK(FillShop, IF(ShoppingList <> "", ShoppingList, "")), DROP(SORT(StackData, 1),,1) )
In attached file next to the Power Query option in sheet SORTED