Uploaded January 2024 | Updated December 2026, 3 hours ago
I'll show you how GROUPBY and PIVOTBY build pivot table style reports with one formula.
⬇️ Download the practice workbook: xelplus.com/groupby-excel/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=download-groupby&utm_content=groupby-pivotby#download-section
⚡ Learn FILTER, SORT, XLOOKUP and more in Master Excel's Essential Modern Functions. 500,000+ enrolled in our courses: xelplus.com/course/new-excel-functions-course/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=modern-functions&utm_content=groupby-pivotby
GROUPBY needs only three arguments: what to group by, what to add up, and how. I walk through the optional arguments for headers, totals and sorting. Then I show three things these functions do better than a pivot table: they update on their own, they can group text, and they can clean up messy data with a filter.
After that, I group dates by year and by month, add a second category with HSTACK, and use PIVOTBY to move a category into the columns.
Version note: when I recorded this, GROUPBY and PIVOTBY were still rolling out. They're now available in Excel for Microsoft 365 only, not in Excel 2024 or earlier. Since then, GROUPBY also got a new last argument, field_relationship, which comes after the filter argument.
00:00 GROUPBY and PIVOTBY: pivot tables as formulas
00:19 The task: sales by manager and division
00:48 GROUPBY: the 3 required arguments
02:19 Optional argument: field headers
03:32 Total depth: grand totals and subtotals
04:43 Sort order
05:19 Advantage 1: results update automatically
05:42 Advantage 2: group text values (ARRAYTOTEXT)
06:45 Unique text list with LAMBDA
07:27 Advantage 3: clean messy data with the filter argument
09:22 Exclude rows that start with Total
10:20 PERCENTOF: each person's share of the total
11:27 Group dates by year
12:06 Group by year and month with TEXT
12:57 Add a second category with HSTACK
13:57 PIVOTBY: put a category in the columns
15:45 PIVOTBY column totals
Related:
Excel LAMBDA, how and when to use it: youtu.be/Rm4y5UqauRw
New Excel functions: youtu.be/VWcLM6_Q_00
➡️ Join this channel to get access to perks: youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
📩 Get one practical Excel tip every week in my free newsletter, Between the Sheets: link.xelplus.com/yt-d-newsletter
Connect with us:
Instagram: instagram.com/lgharani
LinkedIn: linkedin.com/in/leilagharani
#excel #exceltips #excelformulas
I'll show you how GROUPBY and PIVOTBY build pivot table style reports with one formula.
⬇️ Download the practice workbook: xelplus.com/groupby-excel/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=download-groupby&utm_content=groupby-pivotby#download-section
⚡ Learn FILTER, SORT, XLOOKUP and more in Master Excel's Essential Modern Functions. 500,000+ enrolled in our courses: xelplus.com/course/new-excel-functions-course/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=modern-functions&utm_content=groupby-pivotby
GROUPBY needs only three arguments: what to group by, what to add up, and how. I walk through the optional arguments for headers, totals and sorting. Then I show three things these functions do better than a pivot table: they update on their own, they can group text, and they can clean up messy data with a filter.
After that, I group dates by year and by month, add a second category with HSTACK, and use PIVOTBY to move a category into the columns.
Version note: when I recorded this, GROUPBY and PIVOTBY were still rolling out. They're now available in Excel for Microsoft 365 only, not in Excel 2024 or earlier. Since then, GROUPBY also got a new last argument, field_relationship, which comes after the filter argument.
00:00 GROUPBY and PIVOTBY: pivot tables as formulas
00:19 The task: sales by manager and division
00:48 GROUPBY: the 3 required arguments
02:19 Optional argument: field headers
03:32 Total depth: grand totals and subtotals
04:43 Sort order
05:19 Advantage 1: results update automatically
05:42 Advantage 2: group text values (ARRAYTOTEXT)
06:45 Unique text list with LAMBDA
07:27 Advantage 3: clean messy data with the filter argument
09:22 Exclude rows that start with Total
10:20 PERCENTOF: each person's share of the total
11:27 Group dates by year
12:06 Group by year and month with TEXT
12:57 Add a second category with HSTACK
13:57 PIVOTBY: put a category in the columns
15:45 PIVOTBY column totals
Related:
Excel LAMBDA, how and when to use it: youtu.be/Rm4y5UqauRw
New Excel functions: youtu.be/VWcLM6_Q_00
➡️ Join this channel to get access to perks: youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
📩 Get one practical Excel tip every week in my free newsletter, Between the Sheets: link.xelplus.com/yt-d-newsletter
Connect with us:
Instagram: instagram.com/lgharani
LinkedIn: linkedin.com/in/leilagharani
#excel #exceltips #excelformulas










