Home > Blockchain >  Using importrange with Sumifs in Google Sheets
Using importrange with Sumifs in Google Sheets

Time:12-09

I am trying to import some data from a very large sheet into another sheet using the sumif function that contains text and dates

The sumif is as follows:

=SUMIFS(H2:H, D2:D, "United States of America", F2:F, ">01/01/2021", F2:F, "<01/01/2022")

This works and returns the correct number

However when I try to combines this with an importrange function it all falls apart

All help greatly accepted

CodePudding user response:

try:

=QUERY(IMPORTRANGE("id", "sheetname!D:H"), 
 "select sum(Col5) 
  where Col1 = 'Russia' 
    and Col3 > date '2021-01-01'
    and Col3 < date '2022-01-01'
  label sum(Col5)''")
  • Related