1. Home
  2. Functions
  3. Array
  4. PERCENTOF

PERCENTOF function

Returns the sum of a subset of values as a fraction of the sum of all values.

Syntax

=PERCENTOF(data_subset, data_all)

Arguments

ArgumentRequiredDescription
data_subsetRequiredThe values to measure
data_allRequiredAll the values

How to use PERCENTOF

When PERCENTOF returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

PERCENTOF takes 2 required arguments. Type =PERCENTOF( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=PERCENTOF({1,3}, {1,3,4})Result 0.5
=PERCENTOF(1, 0)Result #DIV/0!

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.