Syntax
=PERCENTOF(data_subset, data_all)Arguments
| Argument | Required | Description |
|---|---|---|
data_subset | Required | The values to measure |
data_all | Required | All 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 =PERCENTOF(1, 0)Result Related array functions
- GROUPBYGroups rows by the values of one or more columns and aggregates the values of each group.
- HSTACKPlaces arrays side by side; shorter columns are padded with #N/A.
- MAKEARRAYBuilds an array of the given size by calling a LAMBDA with each row and column number.
- MAPApplies a LAMBDA to each value of one or more arrays and returns the results.
- PIVOTBYSummarizes data by row and column fields and aggregates the values at each intersection.
- QUERYRuns a query (select, where, group by, order by, limit, offset, label) over a range with optional header rows.
- REDUCEReduces an array to one value by applying a LAMBDA to an accumulator and each value.
- SCANApplies a LAMBDA to each value with a running accumulator and returns every intermediate result.
- SEQUENCEReturns a list of sequential numbers in an array of the given size.