GROUPBY & LET Dynamic Formulas in Excel

Group and sum values by category in one dynamic formula with GROUPBY, and name intermediate expressions with LET so long formulas stay easy to read.

1. Group & Sum Rows Dynamically With GROUPBY

In supported versions of Excel, GROUPBY(row_fields, values, function) groups rows by a category column and aggregates values—such as summing amounts by category:

=GROUPBY(B2:B100, E2:E100, SUM)

2. Name Intermediate Values With LET

LET(name1, value1, ..., calculation) assigns clear names to repeated expressions so you calculate them once and reuse them cleanly:

=LET(base, B2, rate, $G$1, base * rate)

Worked Example: LET for Clean Tiered or Tax Math

base (B2) rate ($G$1) =LET(base, B2, rate, $G$1, base * rate)
$400 15% $60.00
$250 15% $37.50

Tips & Error Prevention

Editorial & Accuracy Note: Tested across Microsoft Excel and Google Sheets with worked sample inputs and outputs. Part of the Know Unlimited Excel & Google Sheets Hub.