如何在excel中写入偏移量的引用?

How to write the offset's reference in excel?

单元格d2包含一个数字,假设它是4
我想将偏移量的参考设置为 a5.
"a"&text(d2+1,0) 可以表达字符串 a5, 我想调用 a5a9.

范围内的数据
OFFSET("a"&text(d2+1,0),0,0,5,1)

为什么 excel 中的偏移函数不能接受 "a"&text(d2+1,0) 作为 a5
如何修复excel中的偏移函数表达式?

如果要将 string 转换为 reference

,请使用 INDIRECT 函数
INDIRECT(ref_text, [a1]) 

所以在你的例子中:

OFFSET(INDIRECT("a"&text(d2+1,0)),0,0,5,1)

有关详细信息,请参阅 https://support.office.com/en-us/article/indirect-function-474b3a3a-8a26-4f44-b491-92b6306fa261

但是给定偏移量,...偏移量!您可以将 a1 作为基础并使用 4 实际指定偏移量。即

OFFSET(a1,d2,0,5,1)