为什么显示 #REF

huangapple go评论104阅读模式
英文:

Why does it show #REF

问题

=VLOOKUP($C3,INDIRECT("‘"&I$4&"’!C2:D22"),4,0)

我发现移动或删除单元格会导致无效的单元格引用或函数返回引用错误。

我已经检查了所有地方,但不知道如何清除它。

我期望它会带来一个下拉菜单,显示所有月份以及所选列的单元格中的内容。

英文:
=VLOOKUP($C3,INDIRECT(“‘“&&I$4&”’!C2:D22”),4,0) 

I got moving or deleting cells caused an invalid cell reference Or function is returning reference error.

Have checked everywhere I could and don't know how to clear it.

I was expecting it to bring a drop down of all the months and what’s in the cell of the selected column.

答案1

得分: 3

=即使你整理好引号并移除额外的&符号,你仍然会得到#REF!错误。这是因为vlookup尝试从第四列返回结果,但在这个范围内只有两列。所以要么将4改为2,要么改变范围。

=VLOOKUP($C3,INDIRECT("'"&I$4&"'!C2:D22"),2,0)

或者

VLOOKUP($C3,INDIRECT("'"&I$4&"'!C2:F22"),4,0)

假设在I4中有一个有效的工作表名称。

英文:

Even if you straighten out the quotes and remove the extra &, you still get the #REF! error. This is caused by the fact that the vlookup is trying to return a result from column 4, but there are only two columns in the range. So either change the 4 to 2, or change the range.

=VLOOKUP($C3,INDIRECT("'"&I$4&"'!C2:D22"),2,0)

or

VLOOKUP($C3,INDIRECT("'"&I$4&"'!C2:F22"),4,0)

Assumes there is a valid sheet name in I4.

huangapple
  • 本文由 发表于 2023年5月21日 23:10:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/76300574.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定