Lookup & Reference Modern

GROUPBY

Aggregates values grouped by one or more row fields with a chosen function — a single-axis PIVOTBY.

Available in Microsoft 365 only (GA Sept 2024, Current Channel). MS function page lists 365 only. Not Excel 2024/2021/2019/2016 unless confirmed in your build.

Syntax

GROUPBY(row_fields, values, function, [field_headers], [total_depth], [sort_order], [filter_array], [field_relationship])

What it returns

A spilled array — an aggregated summary by row field.

Arguments

ArgumentRequiredDescription
row_fields Yes
values Yes
function Yes
field_headers No
total_depth No
sort_order No
filter_array No
field_relationship No

Example

=GROUPBY(A2:A100, C2:C100, SUM)

Important to know

Spills.

Row grouping only — use PIVOTBY for rows + columns.

Recent (GA Sept 2024) — confirm the target build.

Related functions

Related learning

No MEE lesson covers this function yet.