Google spreadsheet query execute for entire column

感情迁移 提交于 2019-12-11 03:17:44

问题


I tried VLOOKUP function for two separate Google spreadsheets but it doesn't support, So I figure it out my required function with a QUERY using a ImportRange function.

Here it is:

=QUERY( ImportRange( "sheet key" , "Course Data!A2:I4" ) , "select Col2 where Col1 = '" & E2 & "' limit 1" )

This is execute well for selected cell, it return value from the second spreadsheet according to the value of the current sheet E2 cell.

What I want to achieve is run this query for entire column (E3, E4, E5...)

I am new to Google Spreadsheets and saw something on internet with ARRAYFORMULA. But I couldn't apply it here.


回答1:


I was wrong ! VLOOKUP supports for two different spreadsheets.

This is work fine:

=ARRAYFORMULA(IFERROR(Vlookup(E2:E,ImportRange( "sheets key (url in new sheets)" , "Course Data!A2:I4" ) ,2,False)))

Cheers!



来源:https://stackoverflow.com/questions/30413194/google-spreadsheet-query-execute-for-entire-column

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!