Excel:当内容由if语句确定时获取源单元格的单元格地址
我有一个单元格(我们称之为 A1),它使用 if 语句来确定其内容。 即:
=IF(SheetName!H9="";SheetName!H$3;IF(SheetName!I9="";SheetName!I$3;IF(SheetName!J9="";SheetName!J$3;IF(SheetName!K9="<>";SheetName!K$3;"stopped"))))
因此,根据哪个陈述为真,单元格 A1 将填充不同的内容。
到目前为止,一切都很好。
现在我需要找出 A1 从中提取内容的单元格的实际地址。
我将使用什么函数返回 A1 中显示内容的单元格的地址?
我做了作业、查看、使用了这里的搜索功能,但花了很多时间没有找到我需要的答案。我发现了很多关于 Excel 的其他有用的见解,但这个问题仍然没有解决。
非常感谢
i have a cell (lets call it A1) which uses an if statement to determine its content.
i.E:
=IF(SheetName!H9="";SheetName!H$3;IF(SheetName!I9="";SheetName!I$3;IF(SheetName!J9="";SheetName!J$3;IF(SheetName!K9="<>";SheetName!K$3;"stopped"))))
so depending on which statement turns out to be true, the cell A1 will be populated with different content.
so far so good.
now i need to find out the actual adress of the cell that A1 is pulling its contents from.
What function would i use to return the adress of the cell whos content is being displayed in A1?
i did my homework, looked, used the search function on here and many hours have been spent on not finding the answer i need. i found tons of other useful insights into excel, but this problem remains unsolved.
thank you very much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以做的是使用与您已经构建的公式几乎相同的公式在单元格中显示您想要引用的地址(比方说
B1
):这将返回一个字符串 与单元格的地址。
然后,您可以使用
INDIRECT
获取单元格的值。例如,您可以输入A1
:我让您根据您需要的参考将
B1
更改为所需的$
。What you can do is display the address you want to refer to in a cell (let say
B1
) with almost the same formula as the one you already built:This will return a string with the address of the cell.
Then, you can get the value of the cell with
INDIRECT
. For instance, you can put inA1
:I let you change the
B1
with the needed$
depending on the reference you need.有像 MATCH 这样的函数,它可以找到所需内容的位置(来自引用的行号)。然后您可以将其转换以显示地址。
There are functions like MATCH, which finds the position (row number from reference) of the desired content. Then you can transform it to show the address.
没有原生公式可以获取包含该公式的单元格的地址。
我找到了解决方案,它也应该在条件格式的公式中起作用。
要获取包含公式的 q 单元格的地址,您应该键入:
There is no native formula to get the address of the cell containing the formula.
I found the solution, which should probably function in the formulas in conditional formatting as well.
To get the address of q cell containing the formula you should type: