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 trial

Data Analysis Spreadsheet Basics Spreadsheet Functions & Shortcuts The SUMIF Function

Why is it that when I select for the [sum_range] the whole C column, like C:C, it yields a totally different result?

I am aware that when selecting the whole C column, the function takes in the column's header, which is "Price" in this case. But weirdly enough, if you shorten the sum_range beyond C2:C88 to, for example, C8:C70, you get as well a totally different result. I have not been able to establish a relationship between these variations.

I would appreciate every insight into why this happens.

Thank you in advance!

2 Answers

Michael Watson
STAFF
Michael Watson
Treehouse Teacher

Hi Agustin Zambrano, it looks like it's because you're shrinking the amount of cells that are included in the sum range. The syntax for the SUMIF Function:

=SUMIF(range, criteria, [sum_range] )

So if you reduce either the range or sum range, then the output will likely decrease (assuming there are no negative values in the range :smile: ). If you share a link to your spreadsheet or a screenshot I could give more direct feedback.

Selecting C8:C70 leaves out those same two rows Michael Watson was talking about, namely C83 and C84. Leaving them out is what changes the output.