Dapatkan rata-rata sekelompok angka
=AVERAGE(number1, [number2], ...)
| Parameter | Deskripsi |
|---|---|
number1 |
A number or cell reference that refers to numeric values. |
number2 |
[optional] A number or cell reference that refers to numeric values. |
A typical way to use the AVERAGE function is to provide a range, as seen below. The formula in F3, copied down, is:
=AVERAGE(C3:E3)
However, note the zero (0) value in C5 is included in the average, since it is a valid numeric value. To exclude zero values, use AVERAGEIF or AVERAGE
=AVERAGEIF(B3:D3,">0") // exclude zero
=AVERAGE(A1,A2,4) // returns 3
=AVERAGEIFS(C5:C14,D5:D14,"red") // red average
=AVERAGEIFS(C5:C14,D5:D14,"blue") // blue average
The average function automatically ignores empty cells in a set of data. However, if the range contains no numeric values, AVERAGE will return a #DIV/
=IF(COUNT(range)>0,AVERAGE(range),"") // check count first
To calculate the average, AVERAGE sums all numeric values and divides by the count of numeric values. This behavior can be replicated with the SUM and
=SUM(range)/COUNT(range) // manual average calculation