Excel like a finance pro.
Math function
PERCENTOF
Returns the percentage that a subset of data makes up of the whole; built for GROUPBY and PIVOTBY.
When to use it
The share that a subset of values makes up of a larger set, as a fraction. Written for GROUPBY and PIVOTBY, where it turns a sum into a percent-of-total column.
The shape of it
- Syntax
=PERCENTOF(data_subset, data_all)
- Example
=GROUPBY(A2:A50,C2:C50,PERCENTOF)
Worked examples
Simple share
=PERCENTOF({20,30},{20,30,50}) → 0.5
50 out of 100.
Share by group
=GROUPBY(A2:A20,C2:C20,PERCENTOF) → Region | share
Each region's share of total sales, adding to 100%.
Share of a block
=PERCENTOF(C2:C5,C2:C20) → 0.25
The first four rows are a quarter of the column.
Worth knowing
- Format the result as a percentage.
- In GROUPBY it replaces the SUM(group)/SUM(all) helper column.
- Requires Microsoft 365.
Where it goes wrong
- #NAME? in Excel versions before 2024.
- Text in either range is ignored, which can make shares not add to 100%.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.