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. Anonymous
    2023-04-22T15:12:41+00:00

    Hi Richard,

    try:

    =SUMPRODUCT((E4:E16&F4:F16=TEXTAFTER($I$2," ")&LEFT($I$2))*G4:G16)

    or

    =SUMIFS(G4:G16,E4:E16,TEXTAFTER($I$2," "),F4:F16,LEFT(I2))

    Claus

    0 comments No comments
  2. Anonymous
    2023-04-22T15:24:25+00:00

    I've used both it made no difference, just 'problem with formuala' pop up.

    0 comments No comments
  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more