简体   繁体   English

Excel:如何通过包含文本查找单元格编号并返回它

[英]Excel: how do i lookup a cell number by containing text and return it

my problem is the following: I need a formula that takes a text value from column A and checks if this value is in column Q. If yes it should return the value of the associated cell in column P.我的问题如下:我需要一个公式,它从 A 列中获取文本值并检查该值是否在 Q 列中。如果是,它应该返回 P 列中关联单元格的值。

But i already fail to return the cell address of column Q if it matches.但是如果匹配,我已经无法返回 Q 列的单元格地址。

This is my formula:这是我的公式:

=IF(COUNTIF($Q$2:$Q$577;A222);MATCH(A222;$Q$2:$Q$577M;0);" ")

You can use INDEX and MATCH to get this output like Rory suggested您可以像 Rory 建议的那样使用 INDEX 和 MATCH 来获取此输出

=IFERROR(INDEX($P$2:$P$577;MATCH(A222;$Q$2:$Q$577M;0));"")

If you have O365, you can also use Xlookup like this:如果你有 O365,你也可以像这样使用Xlookup

=XLOOKUP(A222;$Q$2:$Q$577;$P$2:$P$577)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM