Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Data Analysis Spreadsheet Basics Getting Started With Spreadsheets Getting Started With Spreadsheets Review

Murilo de Melo
Murilo de Melo
13,962 Points

Filter applied, only the categories F&B and Entertainment selected, =SUM(B5:B176), result: $9,431.00. What's wrong?

The question:

"In the Expenses spreadsheet you opened in the first question, the total dollar value of all items in the F&B and Entertainment categories is: $"

(Spreadsheet Basics, review questions Part 2, Treehouse)

I applied the process I posted as title to this post and got the result $9,431.00. The answer is not correct and would like to understand why.

Best regards

Murilo

2 Answers

Murilo de Melo
Murilo de Melo
13,962 Points

Thank you Kris, this helped to see that I was actually doing right with selecting the categories/rows based on (B176-B5 = 171 items) but not the way finding the result.

I found out that I cannot use =SUM() with filter, because as the tutor said the items are only hidden, not gone, so it was still summing the hidden items, although in the bottom of the page it was displaying the right result. I got the message in the video, I guess, but it was not said explicitly that =SUM() should not be used with filtered content. Sort of should have deduced.

For filtered content, I should use a =SUBTOTAL() function instead.

(https://www.techrepublic.com/blog/microsoft-office/how-to-sum-values-in-an-excel-filtered-list/).

Best regards

Murilo

Check your filter. You must be including some additional categories/rows (B176-B5 = 171 items) as your value is too high. With the filter applied I had 113 items with a total sum of 3583.00 which was correct.