Google Sheets – SUMIFS for Data from Another Sheet

google sheetsgoogle-sheets-queryimportrange

I have a sheet with bank statements and a want to set up a summary sheet with the total amounts per client.

I know how to do that from within the statements sheet, e.g. summing up client A:

=SUMIF(B1:B,A1:A,"A")

enter image description here

But how can I do it directly from the summary sheet? Is there a way?

Best Answer

how can I do it directly from the summary sheet?

Your summary sheet is just another tab

=SUMIF('summary sheet'!A31:B41,"A",'summary sheet'!B31:B41)

Your summary sheet is a different spreadsheet altogether
Neither SUMIF nor SUMIFS work well when referring to a different spreadsheet.

In this case you should use a combination of the QUERY function and the IMPORTRANGE

=QUERY(IMPORTRANGE("xxxxxx","'summary sheet'!A31:B41"),"select Sum(Col2) where Col1='A' LABEL Sum(Col2) '' ")  

(please adjust ranges to your needs)