• 549K Members
• 6,709 Online
• 657K Conversations

Highlighted
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
Highlighted

# 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.

Highlighted

# 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.

Highlighted

# Re: Formula SUMIF - mistake

@Sergei Baklan Thanks a lot!

Highlighted

# Re: Formula SUMIF - mistake

@Aureanne , you are welcome

Highlighted

# 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.
Highlighted

# 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.

Highlighted

# 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.
Highlighted

Highlighted

# 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
SumIf multiple columns
Gemma Telfer in Excel on
3 Replies
Drop Down & Sumif?
Lplayer92 in Excel on
3 Replies
Leap year formula
Hattsoff in Excel on
4 Replies