=SUM(IMPORTRANGE("1kWMBhk0T423p411K5_5sKOMQFdAsEDapdasYyr9gZj8","Oct!N2:N") "SELECT Col16, where Col16 contains 'Paid' )")

I need to calculate only the total of paid invoices

Does somebody had a similar situation?

1 Answer 1


The formula is using incorrect syntax, and there are semantic issues as well. You are only importing one column. That column cannot simultaneously contain 'Paid' and a number in the same row.

Use this pattern:

  importrange("1kWMBhk0T423p411K5_5sKOMQFdAsEDapdasYyr9gZj8", "Oct!A2:Z"), 
  "select sum(Col9) where Col14 contains 'Paid' label sum(Col9) '' ", 

Replace Col9 with a reference to the column you want to sum, and Col14 with a reference to the column that contains Paid flags.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.