Microsoft Excel
How to Use GROUPBY with HSTACK for Non-Adjacent Columns in Excel
Excel's GROUPBY function is a formula-based alternative to PivotTables that updates automatically and offers more aggregation options — including MEDIAN, MODE, and custom LAMBDA functions. When you need to group by columns that aren't next to each other, HSTACK lets you combine non-adjacent columns into a single