A to Z of Excel Functions: The PERCENTOF Function
11 December 2023
Welcome back to our regular A to Z of Excel Functions blog. Today we look at the PERCENTOF function.
The PERCENTOF function
![](http://sumproduct-4634.kxcdn.com/img/containers/main/./image1-1701173162.jpeg/b29fb1d3fb912be62ca3d448359ded73.jpg)
This function may be used in conjunction with functions such as GROUPBY and PIVOTBY, or else on its own. This is used to return the percentage that a subset makes up of a given dataset. It is logically equivalent to
SUM(subset) / SUM(everything)
It sums the values in the subset of the dataset and divides it by the sum of all the values. It has the following syntax:
=PERCENTOF(data_subset, data_all)
The arguments are as follows:
- data_subset: this is required, and represents the values that are in the data subset
- data_all: this too is required, and denotes the values that make up the entire set.
Consider the following Excel Table called tbl:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/./image2-1701173368.png/fdc5c2f22b08ab056f10c270373a93f8.jpg)
You can use it, for example, with GROUPBY:
=GROUPBY(tbl[Category],tbl[Sales],PERCENTOF)
![](http://sumproduct-4634.kxcdn.com/img/containers/main/./image3-1701173446.png/6789c66152c2974a39ffd988e82737ca.jpg)
Alternatively, it may be used on its own:
=PERCENTOF(G13:G14,G13:G16)
![](http://sumproduct-4634.kxcdn.com/img/containers/main/./image4-1701173454.png/fbf43d0bbd4b067472ed3eed3c34fb33.jpg)
We’ll continue our A to Z of Excel Functions soon. Keep checking back – there’s a new blog post every other business day.