title: How to use Sumif using range from a complete different Googlesheet/doc
body: <p>I know how sumif works when I need to access it within the same Google "workbook" (using the analogy from excel). By workbook I mean a collection of sheets, not sure whether there is a different way to refer to Google workbook.</p>
  
  <p>For example in the sheet (Example 3): <a href="https://docs.google.com/spreadsheets/d/1Dm-N-1X38zHartE3JbPUtWDnYwEpkGHl6v06huvjSa8/edit#gid=0" rel="nofollow">https://docs.google.com/spreadsheets/d/1Dm-N-1X38zHartE3JbPUtWDnYwEpkGHl6v06huvjSa8/edit#gid=0</a></p>
  
  <p>I have Sheet2, with column A contain strings and column B containing numerical value. On sheet 1, I have a sumif function which can be query data stored in Sheet2, and sum the cells which match A1 in Sheet1.</p>
  
  <p>The problem starts happening when I try to refer to ranges in a completely different workbook, which is shown below.</p>
  
  <p>I am trying to do a sumif over 2 ranges from a different "workbook". The data is stored here (Example 2): <a href="https://docs.google.com/spreadsheets/d/1P5Inf09fLSRmsGbG7LwlE4V-r7DzqY0SB5tJuMKMZH0/edit#gid=0" rel="nofollow">https://docs.google.com/spreadsheets/d/1P5Inf09fLSRmsGbG7LwlE4V-r7DzqY0SB5tJuMKMZH0/edit#gid=0</a></p>
  
  <p>The Sumif function is in Cell B1 of the following sheet (Example 1):<a href="https://docs.google.com/spreadsheets/d/1AitilELd6w7Dbv9d-mKhBYGTBaO6DdkU29Y5mofX2TI/edit#gid=0" rel="nofollow">https://docs.google.com/spreadsheets/d/1AitilELd6w7Dbv9d-mKhBYGTBaO6DdkU29Y5mofX2TI/edit#gid=0</a>.</p>
  
  <p>From my understanding importrange is typically used to refer to ranges in completely different workbooks, as a result I use importrange as the first and last arguments in the sumif function in the Sheet Example 1. </p>
  
  <p>What am I doing wrong? Why is this not working?</p>
  
  <p>Can anybody help?</p>
  
  <p>Thanks a lot</p>