Excel Sumif with Array

Anonymous
2023-04-22T13:01:26+00:00

I don't know if I'm not doing something right or if SUMIF can't handle the array,

what I've been trying to do is ;

SUMIFS( G4:G18,TEXTAFTER(I2," ")&" "&LEFT(I2),E4:E18&" "&F4:F18)

I've got filter to work

FILTER(G4:G18,E4:E18&" "&F4:F18=TEXTAFTER(I2," ")&" "&LEFT(I2)),
which I can then sum,

or sumproduct;

SUMPRODUCT(--(TEXTAFTER(I2," ")&" "&LEFT(I2)=E4:E18&" "&F4:F18),G4:G18)

Is it possible to use Sumifs in this situation

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} vote
Answer accepted by question author
  1. Ashish Mathur 100.8K Reputation points Volunteer Moderator
    2023-04-23T23:19:35+00:00

    Hi,

    the reason the SUMPRODUCT() function works is that the input into this function is an array (and not a range). In a SUMIF() function, the input is a range. E3:E8&" "&F3:F8 is an array (not a range).

    Hope this clarifies.

    2 people found this answer helpful.
    0 comments No comments

12 additional answers

Sort by: Most helpful
  1. Ashish Mathur 100.8K Reputation points Volunteer Moderator
    2023-04-23T01:45:02+00:00

    Hi,

    Does it work when you replace comma with semi-colon?

    0 comments No comments
  2. Anonymous
    2023-04-23T13:08:35+00:00

    Sumproduct as shown in original example works, but leaving out any any the space that I had does not seem to make a difference, I still get the same error.

    0 comments No comments
  3. Anonymous
    2023-04-23T13:27:57+00:00

    No, afraid not I've got the principal to work by using helpers,
    but as soon as I try it in one formula it fails. As I hope this shows I've added helper range and criteria and this works.

    If you can see what I'm doing wrong please let me know,

    RD

    0 comments No comments