6

I'm trying this function on Google spreadsheet without success in order to gather in a sheet a value after a VLOOKUP:

=importrange("otherurl";cell("address";vlookup(value("201608"),"All_nodevice!$A$16:$C$1000",2,false)))

I get a general error.

Does IMPORTRANGE support this kind of functionality?

What I need to do is to extract data from the cell of another sheet that has the value 201608 on its left. Since IMORTRANGE wants a cell pointer such as $A$12, I thought to do these steps:

  1. search with a lookup the value.
  2. convert the result in a cell pointer.
Community
  • 1
  • 1
Luca
  • 848
  • 1
  • 14
  • 33
  • IMPORTRANGE requires two arguments, the spreadsheet key and a range_string. It doesn't matter if you include them as literals or as calculations. What is the result of vlookup? – Rubén Sep 01 '16 at 01:52
  • Added more details. – Luca Sep 01 '16 at 06:52
  • The result of the vlookup is a value (i can test it only on the target spreadsheet). The result of the full function is an Error. Translating from italian is something like "error in function analysis" – Luca Sep 01 '16 at 06:58

2 Answers2

14

I found the right way. May be it could be useful for someone else.

=VLOOKUP(201608;IMPORTRANGE("sheet url"; "All_nodevice!$A$16:$C$1000"); 2; 0)

or

=query(IMPORTRANGE("sheet url";"All_nodevice!$A$16:$C$1000");"select Col2 where Col1=201608 limit 1")
Luca
  • 848
  • 1
  • 14
  • 33
4

Just the ID worked for me as well instead of the URL. I had my numbers as text, so kept getting an error at first. Silly mistake, but what you are looking up probably has to be the same kind of thing (text vs numbers).

=vlookup(Q6,IMPORTRANGE("1m9IN4_NH717VATXWLnPgTvrKxnRHwtH8z-f38r9F3zY","Props!A1:Bb400"),38,false)
gre_gor
  • 6,669
  • 9
  • 47
  • 52