Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
The SUMIF Function2:41 with Michael Watson
SUMIF is a very handy function. It combines the SUM and IF functions to sum up values based on conditions you specify.
- you can continue to use the spreadsheet from the last video, or
- open a copy of this spreadsheet to catch up to this video
SUMIF is a great function I use fairly regularly.
It combines sum and if functions to sum up values based on conditions you specify.
Maybe a manager is looking at the spreadsheet of all their salespeople and
wants to know how many of them sold more than $1
million worth of business last month.
She could use the SUMIF function to calculate that.
Let's revisit the retail interview spreadsheet to do a SUMIF calculation.
>> We're back in our retail transaction spreadsheet example now and we're trying
to answer the question, what is the total value of all the jeans that we sold?
We could use sorts and filters to figure this out or we can use the SUMIF function.
So I'm selecting cell G2,
hitting Enter and =SUMIF.
And the syntax is first the range, then the criterion, then the sum range.
So basically what range are we looking at?
In this situation, it's gonna be the Items column.
Then the criterion.
And we're looking at jeans, so we want this to be equal to jeans.
And then the sum range.
In the sum range here, we wanna know the total value of all the jeans we sold, so
we are gonna be summing up the price.
So let's enter this into the function.
I'm gonna select all the different items we sold as our range.
Then the criterion is =Jeans.
Then the sum range,
And I actually don't need to enter an equal sign here, that's redundant.
So the total value of all the jeans that we sold is $1,400.
So I could've done that by adding up all these different line items.
And if we select all these cells, we can see down here that it's 1,200.
So what is missing?
We have two jeans down here.
So using the SUMIF function helped correct for a potential human error.
It's really important that the syntax you use is exact.
If you have a misspelling here, nothing will be there.
So make sure when you're using SUMIF functions that your criterion is exact.
You need to sign up for Treehouse in order to download course files.Sign up