PercentOfTotal is a mathematical function that returns the result of a numeric value, row, column, or cell divided by another numeric value, row, column, or cell which is multiplied by 100. The function syntax:
PercentOfTotal (arg1, arg2)
where arg1 is a component of the running total (arg2). Normally, this is a row or column reference.
where arg2 is the running total relative to arg1. Normally this is a cell reference containing the grand total.
arg1 is divided by arg2, with the result multiplied by 100. Arg1 and arg2 are one or more of these arguments:
Argument | Description |
---|---|
numeric | A numeric value. For example, PercentofTotal (100, 20) returns the value 500. Numeric values can include decimals and negative values. |
row, column, or cell reference | A pointer to a row, column, or cell within a grid. References can be specified in several ways. The reference syntax: GridName.GridElement[segment(range)].Property |
function | An embedded function |
Note: | This function requires two arguments. |
Examples:
The following example returns the value of 5 percent.
PercentofTotal(20, 400)
The following example divides the value of each cell in column A by the Total Mkt value in cell A5, multiplies the result by 100, and displays the resulting PercentOfTotal in column B. The formula:
PercentOfTotal ([A], [A,5]),
Using the above example, the following table shows the PercentOfTotal results in column B:
A | B | ||
---|---|---|---|
1 | Sales | % Total | |
2 | Mkt1 | 60 | 20% |
3 | Mkt2 | 120 | 40% |
4 | Mkt3 | 120 | 40% |
5 | Total Mkt | 300 | 100% |