Mengembalikan subkumpulan data sebagai persentase dari semua data
=PERCENTOF(data_subset, all_data)
| Parameter | Deskripsi |
|---|---|
data_subset |
A subset of data as a range or array. |
all_data |
All data as a range or array. |
The PERCENTOF function is designed to return a subset of data as a percentage of a larger data set. The output from PERCENTOF is a decimal number that
=SUM(data_subset)/SUM(data_all)
The result will be a decimal number that must be formatted as a percentage. For example, if the subset of data is 250 and the full set of data is 1000
=PERCENTOF(250,1000) // returns 0.25
In the worksheet shown above, the formula in cell D5 looks like this:
=PERCENTOF(C5,$C$5:$C$12)