• 410K Members
• 7,785 Online
• 466K Conversations

New Contributor

# Formula SUMIF - mistake

Hi,

I used the formula SUMIF and found a mistake on my formula.

After corrected the formula, I had a different total amount.

Could you please explain to me where does the variance come from knowing that the cell J2 there is only a text ("total")?

Thank you and best regards,

9 Replies

# Re: Formula SUMIF - mistake

@Aureanne , second formula returns correct result. With first formula SUMIF shifts on one cell up with cells to sum. For example, if you have A in J5 and J7, SUMIFS returns K4+K6 in first case and K5+K7 for the correct formula.

# Re: Formula SUMIF - mistake

@Aureanne , other words it finds positions of the cells which meet criteria in criteria range and sum cells on the same positions starting from the beginning of the sum range.

# Re: Formula SUMIF - mistake

@Sergei Baklan Thanks a lot!

# Re: Formula SUMIF - mistake

@Aureanne , you are welcome

# Re: Formula SUMIF - mistake

SUMIF requires that both range and sum_range arguments must always be equal in size and shape; otherwise, Excel coerces the sorter argument to conform to the longer one. When that happens, the result may be different from what you have expected.
My simple advice is that don’t coerce Excel to make your formula conform to its syntax. Rather, always ensure that you conform to Excel’s syntax.

# Re: Formula SUMIF - mistake

@Twifoo , SUMIF doesn't require what ranges have to be the same size, they could be different. Another story is what as a rule better to use same size ranges.

# Re: Formula SUMIF - mistake

Excel insists, and so requires, both range and sum_range arguments to be equal. In the SUMIF syntax, just like law, the word “require” should be construed according to its spirit that gives life to, rather than according to its literal sense that kills, its true meaning.

# Re: Formula SUMIF - mistake

That’s exactly my emphasis earlier. I construed the word “require” according to its spirit that gives life to its true meaning. Apparently, you construed it according to its literal sense. I won’t insist how you construe it. That’s your prerogative and I respect it, although I won’t necessarily conform thereto.
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies