如果两个单元格匹配,则从第三个单元格返回值 [英] If two cells match, return value from third

查看:40
本文介绍了如果两个单元格匹配,则从第三个单元格返回值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我遇到的问题的简单说明.

Here's a simple explanation of what I'm having trouble with.

A 列:2300 个订单号列表
B 列:与订单号关联的电子邮件地址
C 列:我需要电子邮件地址的 100 个特定订单号的列表

Column A: List of 2300 order numbers
Column B: Email Address associated with an order number
Column C: List of 100 specific order numbers that I need the email address for

因此,我希望在 A 列中搜索与 C 匹配的值,然后在新列 (D) 中返回 B 列中的电子邮件地址.

So, I'm looking to search column A for a value that matches C, and return the email address from column B in a new column (D).

当前的公式几乎有效,但它不会返回 A 匹配 C 的电子邮件地址,而是返回同一行的电子邮件地址.

The current formula almost works, but instead of returning the email address where A matched C, it returns the email address from the same row.

=IF(ISERROR(MATCH(C2,A:A,0)),B2)    

本质上我只需要上面公式中的 B2 从匹配的同一行返回值.

Essentially I just need B2 in the formula above to return the value from the same line that matched.

推荐答案

我认为你想要的是:

=INDEX(B:B,MATCH(C2,A:A,0))  

我应该提到 MATCH 检查可以在 A:A 中找到值的 位置(给定 0 或 FALSE 参数,它只查找完全匹配并给出它的性质,仅找到第一个实例)然后 INDEX 返回 B:B 中该位置的值.

I should mention that MATCH checks the position at which the value can be found within A:A (given the 0, or FALSE, parameter, it looks only for an exact match and given its nature, only the first instance found) then INDEX returns the value at that position within B:B.

这篇关于如果两个单元格匹配,则从第三个单元格返回值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆