Search code examples
google-sheetsgoogle-sheets-formulavlookuparray-formulas

How to change indirect to vlookup to use in arrayformula iteration


I have the following:

=indirect("'Form Responses 1'!A"&G2)

Where column A has timestamps and column G in this sheet has row numbers. I need to iterate that using arrayformula like this:

=ArrayFormula(indirect("'Form Responses 1'!A"&G2:G))

However, that didn't work. I found out that indirect doesn't work within Arrayformula, and that I should use vlookup instead, but I don't know how to get it to work or how to reference rows in vlookup.

Any ideas? Thanks.


Solution

  • Try with BYROW to iterate "row by row":

    =BYROW(G2:G,LAMBDA(each,IF(each="","",Indirect("'Form Responses 1'!A"&each))))