Please note javascript is required for full website functionality.

Blog

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

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:

You can use it, for example, with GROUPBY:

=GROUPBY(tbl[Category],tbl[Sales],PERCENTOF)

Alternatively, it may be used on its own:

=PERCENTOF(G13:G14,G13:G16)

 

We’ll continue our A to Z of Excel Functions soon.  Keep checking back – there’s a new blog post every other business day.


Newsletter