Search code examples
google-sheetsfiltersumrangesumifs

Yes another "Argument must be a range" question


After struggling with this formula for over an hour, I turn to SO.

=SUMIF(indirect($A$1&"!$Q$3:Q"),indirect($A$1&"!$E$3:E"),"="&J5)

I am getting a Argument must be a range error here

The approach is simple - sum up whatever corresponds with J5 value (CSIQ in this case) on sheet referenced in $A$1

What am i missing here please?

enter image description here


Solution

  • try (if you want to sum Q):

    =SUM(FILTER(INDIRECT($A$1&"!Q3:Q"), INDIRECT($A$1&"!E3:E")=J5))
    

    try (if you want to sum E):

    =SUM(FILTER(INDIRECT($A$1&"!E3:E"), INDIRECT($A$1&"!Q3:Q")=J5))