Say you have one spreadsheet like this:
Now, in another spreadsheet, you have something like:
x for each person in the second spreadsheet, I can put a formula like this in column B:
=if( $A2<>"", sum( query( importrange(remote_spreadsheet_id, "Sheet1!B:F"), "select Col2,Col3,Col4,Col5 where Col1 = """ & $A2 & """ limit 1", 1) ), "")
...and I get this:
...but wait! There's a problem!
Reza isn't yet in the first spreadsheet, and yet, from the output, you can't tell -- both Reza and Wei show up as
0, when I'd prefer Reza (for whom we don't yet have data) to show up as a blank (
How can I do this without wrapping a duplicate query in an if statement? I've tried playing with
iferror and can't seem to get it right. :(
EDIT: See below for sample screenshot from my spreadsheet, where each of the 9 columns containing floating-point numbers & white backgrounds are auto-populated from different remote spreadsheets via importrange.