使用公式参考细胞? - Google Spreadsheets

use*_*232 32 reference google-sheets

这个问题必须有一个基本的答案,但它让我疯狂.在Google Spreadsheets中,我需要通过(列,行)引用单元格,我可以用公式替换"row"来查找特定行.换句话说,我不能使用像"A7"这样的引用,因为我的行由公式决定.这是给我行号的公式,

=ArrayFormula(MAX(FILTER(ROW(B:B);NOT(ISBLANK(B:B)))))
Run Code Online (Sandbox Code Playgroud)

Ivo*_*Ivo 54

您可以使用indirect()动态引用单元格

使用: indirect("string that evaluates to a reference")

示例:=Indirect("A"&B2)使用A列中B2的行复制单元格的值

在您的情况下,它将(替换[column]为所需的列):

indirect("[column]"&ArrayFormula(MAX(FILTER(ROW(B:B);NOT(ISBLANK(B:B))))))
Run Code Online (Sandbox Code Playgroud)

  • +1 我使用 INDIRECT 函数和 ADDRESS 函数,通过将此函数放入第二个工作表的行中,将一个工作表中的列标题转换为另一张工作表中的行标题:`=INDIRECT(ADDRESS(1, 6 + Row(A1) , , ,"Sheet 1"))` [地址函数](https://support.google.com/docs/answer/3093308)。感谢回复! (3认同)