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 SUM function is a premade function in Google Sheets, which adds up numbers in a range
The SUM function is a premade function in Google Sheets, which adds up numbers in a range.
It is typed =SUM
and gets a list of cells:
=STDEV.S(value1, [value2, ...])
You can select cells one by one, but also ranges, or even multiple ranges.
Note: The =SUM
function adds up both negative and positive cell values.
Let's see some examples!
Calculate the sum of all the Total stats for this list of Pokemon:
The SUMSUM function, step by step:
B12
=SUM
B2:B10
for the Total statsNow, the function calculates the sum of Total stats for the Pokemon in the list:
=SUM
function. The Pokemon's stats have a total sum of 3092
.
Let's change one of the values in the range, to see what happens. Type 350
into cell B7
:
253
to 350
.
The SUM function updated the total sum from 3092
to 3189
.
It updates the SUM when values inside of the range are changed.
Lets change Rattata's stats to a negative number to see what happens. Type -350
into cell B7
:
The SUM is updated to 2489
. Adding a negative number subtracts that value from the range.
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}`) }) }