Excel:当内容由if语句确定时获取源单元格的单元格地址

发布于 2024-12-02 01:09:48 字数 451 浏览 2 评论 0原文

我有一个单元格(我们称之为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

森罗 2024-12-09 01:09:48

您可以做的是使用与您已经构建的公式几乎相同的公式在单元格中显示您想要引用的地址(比方说 B1):

=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"))))

这将返回一个字符串 与单元格的地址。

然后,您可以使用INDIRECT获取单元格的。例如,您可以输入 A1

=IF(B1="stopped","stopped",INDIRECT(B1))

我让您根据您需要的参考将 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:

=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"))))

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 in A1:

=IF(B1="stopped","stopped",INDIRECT(B1))

I let you change the B1 with the needed $ depending on the reference you need.

凹づ凸ル 2024-12-09 01:09:48

有像 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.

陪你搞怪i 2024-12-09 01:09:48

没有原生公式可以获取包含该公式的单元格的地址。

我找到了解决方案,它也应该在条件格式的公式中起作用。

要获取包含公式的 q 单元格的地址,您应该键入:

=ADDRESS(ROW(),COLUMN())

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:

=ADDRESS(ROW(),COLUMN())
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文