logo
excelfunctions.org
bookmarks

PIVOTBY

Helps a user group, aggregate, sort, and filter data based on the row and column fields that you specify.

Lookup & ReferenceDynamic Arrays & LAMBDALookup & Matching EssentialsModern Excel Functions

What it does

Groups data by rows and columns and aggregates values.

Syntax

PIVOTBY(row_fields, col_fields, values, function, [field_headers], [row_total_depth], [row_sort_order], [col_total_depth], [col_sort_order], [filter_array])

Arguments

  • row_fields(range) β€” Rows.
  • col_fields(range) β€” Columns.
  • values(range) β€” Values.
  • function(function) β€” Aggregator.

Examples

Pivot Report

Sales by Region and Product.

FORMULA
=PIVOTBY(A2:A10, B2:B10, C2:C10, SUM)
RESULT
[Table...]
SAMPLE DATA
ABC
1RegionProductSales
2EastApple100