Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Find the sum total of a selection of cells using the SUM function.
Example Google Sheet
- Examples (click to make a copy of this spreadsheet to follow along with this video.)
References
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Now that we've got some of the basics
out of the way, let's jump in and
0:00
start working with a spreadsheet.
0:04
In this video,
we'll work through an example spreadsheet
0:06
that is a list of all transactions
from a growing retail network.
0:09
You're being interviewed by
the owner to help run the operation.
0:13
As a test in the interview process,
they sent you a simple spreadsheet and
0:16
asked you to help them
understand the information.
0:20
Clearly, your potential new boss
didn't do much with this file.
0:24
Let's organize it a bit so
it's easier to work with.
0:27
First I'm gonna expand all the columns so
that I can see the text in each cell.
0:30
You can do this by manually clicking and
dragging columns out like this,
0:34
or you can double-click the column header.
0:39
Note, you can also select all columns and
double-click the top right column
0:46
header and it will expand all
columns to fit all text, like so.
0:51
However, if you manually adjust one column,
0:58
it will make all columns
selected that size.
1:01
Okay, now that we can see all of
the data in each cell clearly,
1:10
let's calculate some basic info.
1:13
Before doing that I'm going to do
something called freezing the panes so
1:15
that the cells don't
change when I scroll down.
1:20
I'm gonna drag this bar
here one row down and
1:24
now you'll see that these cells
at the top are stuck there.
1:27
So when I scroll down
they're always visible.
1:31
So we're gonna calculate
some basic info now.
1:35
For example what were the company's
sales over this time period?
1:38
I'll go down to the bottom of the tab and
then use the sum formula.
1:41
I click this cell, enter the equals sign,
1:48
SUM, then parentheses.
1:53
It asks us what data we want to sum?
2:00
The sales figures in column C
are what I'm interested in.
2:02
So, I can select the cells with my mouse,
like so,
2:06
and put an end parentheses and
click Enter.
2:15
Google Sheets calculates
the total amount of sales for
2:21
this time period which is $25,205.
2:25
Let's talk through the notation
of the sum function.
2:29
If you look up here in the
formula bar, we can see
2:32
=SUM(C2:C88).
2:35
C2 is this third column C and
2:43
2 is the row up here the first
row that I wanna start summing.
2:48
So C2 means this in
the context of that formula.
2:53
C88 is the last cell in this column
that has data on sales for this period.
2:59
Why don't you sum the figures
in this column yourself?
3:06
Go ahead and pause the video.
3:09
I'll wait.
3:11
Okay, were you able to do it?
3:12
Let's just walk through it again.
3:15
I'm gonna delete when I put here
initially and then do it again.
3:17
I'm gonna put = then SUM,
parenthesis.
3:22
I'm going to select all the sum, or
the cells that have dollar values in them,
3:27
close the parentheses, and hit Enter.
3:39
Sum is one of the most
common functions you'll use.
3:43
We'll dig into it more later
3:47
and other functions as well, but for now,
why don't you try and calculating average
3:49
and median sales prices as well,
using the average and median functions.
3:53
Give it a go yourself, and we'll show
you how to do it in the next video.
3:59
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up