Lookup and referenceMicrosoft 365

GROUPBY

Create a spilling summary by grouping records and aggregating measures.

Syntax

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

Worked example

Group three transactions by item and total their units. The two zero arguments suppress field headers and grand totals.

=GROUPBY({"Tea";"Soap";"Tea"},{3;2;4},SUM,0,0)

Result Soap 2 / Tea 7

Microsoft documentation

Check the arguments, supported editions and behavior of this function in Microsoft’s reference.

Microsoft reference

Search ExcelTutor