将 ARRAYFORMULA 与 OFFSET 结合使用,其中数组应为 offset_rows 而不是 cell_reference

Using ARRAYFORMULA with OFFSET where the array should be the offset_rows not the cell_reference

我有一个 table 将序列号连接到项目(例如 1 - 橙子,2 - 苹果,3 - 香蕉) 在 col A 中,我有一个序列号列表,在 col B 中,我希望每个序列号都能获取相关项目。 例子, col A: 2,1,3,1 col B 应该显示:Apple,Orange,Banana,Orange

col A 自动更新所以我需要 B 中的功能来自动更新。我正在尝试使用 ARRAYFORMULA 函数,其中单元格范围是固定的(table 将 # 链接到项目)并且数组应该 运行 在 offset_rows 上 该公式应类似于: =arrayformula('Table',A1:A,0) 但它不起作用。似乎数组只能位于单元格范围 (Table) 而不是 offset_rows (A1:a)。 我可以那样使用arrayformula吗?如果没有,还有其他选择吗?

VLOOKUP 应该可以代替。在单元格 B1 中试试这个公式:

=ArrayFormula(IFERROR(VLOOKUP(A:A,Table,2,0)))

我在这里设置了一个例子sheet:

https://docs.google.com/spreadsheets/d/1r8jqUo5tY0s4K3Bhxxstn2__sdtMtiaeMO29ik9XUuw/edit?usp=sharing