Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMatthew Han
Courses Plus Student 701 PointsI arrived at a different answer
I filtered F&B and Entertainment category and did a =SUM(B5:B176) on the price column but arrived at the result $9341 which the quiz says it is incorrect.
What did i do wrong?
1 Answer
Steven Parker
231,236 PointsThe range B5:B176
would cover every item of all categories except for the first two.
Please explain the process you used when you "filtered F&B and Entertainment category".
Perhaps you applied a view filter instead of a data filter. That would only affect the rows that are shown, not the ones the formula acts on, and could explain the issue.
You might want to try using the SUMIF
function, it has data filtering capability built-in.
Matthew Han
Courses Plus Student 701 PointsMatthew Han
Courses Plus Student 701 PointsHow should i use the SUMIF function?
is the command =SUMIF(B2:B176, "F&B"&"Entertainment") ?
Or how should i key in the function?
Steven Parker
231,236 PointsSteven Parker
231,236 PointsYou'll need to move the value column range to the the third argument of
SUMIF
. The first argument will be for the column where the categories are.And I don't think you can combine the filter criteria like that. But you could have two
SUMIF
functions, one for each category, and then add them together.