I want to know what the correct way is to use IMPORTRANGE while it also gets the correct link for another spreadsheet. What ends up happening is that the link directs to the current file instead of the intended file. Maybe this description is quite vague, so here is a sample repro:
- File
Xhas two sheetsaandb, andb!A1is set to=a!A1. - File
Yhas a sheetc, andc!A1is set to=IMPORTRANGE(<X>, "b!A1").
The expected output is c!A1 should have a hyperlink to b!A1 in X, but the actual output is that Y tries to find for b!A1 which might be a false positive, or it ends up raising an Invalid range exception.
Is there a way to do this, either the correct way or at least a workaround?