SumIf Importrange Function

53 Views Asked by At

Hi I have this formula

=SUMIF('March 2024'!B$4:B$1000,A4,'March 2024'!I$4:I$1000)

Now the March 2024 tab is getting moved to a different spreadsheet. I tried using importrange function but it doesn't work

=SUMIF(IMPORTRANGE("URL","'March 2024'!B$4:B$1000"),A4,IMPORTRANGE("URL","'March 2024'!I$4:I$1000"))

What is the needed formula to make this work? Also a thing to note is A4 has this importrange formula which is working. Formula is shown below.

=unique(filter(IMPORTRANGE("URL","'March 2024'!B4:B"),IMPORTRANGE("URL","'March 2024'!B4:B")<>""))
1

There are 1 best solutions below

0
ab.it.gcp On

This is possibly due to latency issue. Please see this article related to this issue.

However, assuming you are open to a different solution using Google sheets formula itself, you can do it by QUERY formula

=QUERY(IMPORTRANGE("URL", "'March 2024'!B$4:I$1000"),"SELECT SUM(Col8) where Col1 = "&A4)

I tried this and it worked for me.