SOLVED

SUMIF does not accept [sum range] as a range, returns 'there is a problem with this formula'

Copper Contributor

Hi all,

I am trying to write the following function:

=SUMIF(B2:B11261,AND(>=6,<=10),H2:H11261)

The problem is that, for some reason, excel doesn't accept that the H2:H... range of cells are a range.

ShMos_0-1651656003172.png

I tried manipulating the H2:H... cells, and when just summing they come out fine and are accepted as a range of cells, but for some reason not for the SUMIF function. it returns the error:

ShMos_1-1651656217140.png

even though I place the = before the formula.

 

I am pulling hairs, why does this happen? How can I fix it?

 

Notes:

- I'm running on windows 10pro

- I looked at the thread of 'there is a problem with this formula' https://answers.microsoft.com/en-us/msoffice/forum/all/error-display-window-theres-a-problem-with-th...

but that didn't help either.

 

4 Replies
best response confirmed by ShMos (Copper Contributor)
Solution

@ShMos 

That's like

=SUMIFS(H2:H11261, B2:B11261, ">=6", B2:B11261, "<=10")

 

@ShMos 

=SUMPRODUCT((B2:B11261>=6)*(B2:B11261<=10)*H2:H11261)

An alternative could be SUMPRODUCT. 

Thank you! Both solutions worked for me :)
1 best response

Accepted Solutions
best response confirmed by ShMos (Copper Contributor)
Solution

@ShMos 

That's like

=SUMIFS(H2:H11261, B2:B11261, ">=6", B2:B11261, "<=10")

 

View solution in original post