From the course: Excel Quick Tips

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

SUBTOTAL vs. SUM: Choosing the right function

SUBTOTAL vs. SUM: Choosing the right function - Microsoft Excel Tutorial

From the course: Excel Quick Tips

SUBTOTAL vs. SUM: Choosing the right function

- [Instructor] One of Excel's most popular functions is SUM. Here is a use case where we might want to use subtotal instead. Let's position ourself here in cell D12, and I will write =SUBTOTAL. I will open the parenthesis and I will select the function number nine, which does a sub. I'm going to separate my argument with a comma, and then I'm going to select my data range that I want to do a subtotal. So I will select D2 up the way to D9. There we go. I will close parenthesis, and I will press Enter. Here we go. We can think here that it is actually the same result, right? So we have =SUM right here, and then we have =SUBTOTAL. But what if I filter my data on department B? I will just click here on this arrow, on select Department A, and I will click on OK. Boom. As you can see, my subtotal shows 1,000, which is the data that is filtered, right, while my sum shows also everything that we don't see. So that is the difference between sum and subtotal.

Contents