HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The AVERAGE function is a premade function in Google Sheets, which calculates the average (arithmetic mean)
The AVERAGE function is a premade function in Google Sheets, which calculates the average (arithmetic mean).
It is typed =AVERAGE
and gets a list of cells:
=AVERAGE(value1, [value2, ...])
You can select cells one by one, but also ranges, or even multiple ranges.
It adds up all the cell values and divides that sum by the total number of values.
The average of the values (2, 3, 4) is 3.
There are 3 values in total
The sum of the values is (2 + 3 + 4 = 9)
(9 / 3 = 3)
The average is 3
Note: There are multiple types of mean values. The most common type of mean is the arithmetic mean. You can learn more about the arithmetic mean here: Statistics Mean Chapter.
Note: The AVERAGE function ignores cells with text.
Let's have a look at an example where we help the Pokemon trainers to calculate the average of Pokeballs per trainer.
How to use the =AVERAGE
function, step by step:
F2
=AVERAGE
Google Sheets will often give suggestions of how to complete your function based on the data in the spreadsheet.
In this case, the suggestion is precisely what we are looking for, the range B2:E2
.
Click the suggestion, hit enter, and the function is complete!
The function can be repeated with the filling function for each row to calculate the average number of Pokeballs for all the Trainers:
The suggestions are often very helpful for doing things quickly, but don't always suggest precisely what we want.
Let's have a look at a similar example, where the Pokeon trainers have another item in their inventory:
How to use the =AVERAGE
function, step by step:
E2
=AVERAGE
B2
for the Pokeballs,
D2:F2
for the rest of the PokeballsThe function now calculates the average of the cell B2
together with the range D2:F2
.
The function can be repeated with the filling function for each row to calculate the average number of Pokeballs for all the Trainers:
Now, we can see the average number of Pokeballs for each of the trainers:
function copyFormulas(elementId){ /* Get the text field */ var copyText = document.getElementById(elementId); /* Select the text field */ copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ /* Copy the text inside the text field */ navigator.clipboard.writeText(copyText.value) .then(() => { alert('Range copied to clipboard.\nIt can now be pasted into the Google Sheets spreadsheet.') }) .catch((error) => { alert(`Copy failed! ${error}`) }) }