PIVOTBY Function in Excel: A Cross-Tab Without a Pivot Table

⏱ 1 min readUpdated 28 September 2026

Dynamic ArrayLevel: ExpertAvailable in: Excel 365 / 2021+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Related functions

PIVOTBY groups by rows and columns at once — regions down, months across — as a formula.

Syntax

=PIVOTBY(row_fields, col_fields, values, function, ...)
Argument What it means
col_fields Column(s) that become headers across.

Examples

Example 1

=PIVOTBY(B2:B500, TEXT(A2:A500,"mmm"), E2:E500, SUM)

Region × month sales grid.

GROUPBY · SUMIFS

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong