问题描述
我正在尝试检查一个单元格是否包含(不等于)列表中的值。我喜欢如果公式返回一个真/假结果,所以我可以进一步嵌入到一个if函数。
I am trying to check if a cell contains (not equals) a value from a list. I would prefer if the formula returned a true/false result so I can further embed it into an if function.
我想检查的单元格中的值的样本。为了清楚起见,请在建议中填写A栏。
Sample of values in cells I want to check. For clarity, please call these column A in suggestions.
MIA / EWR / MIA
LGA / PIT
HKG / TPE / HKG / MNL / HKG
LGB / IAD
MIA / GRU / MIA
YUL / LGA
FLL / BOG / MDE / FLL SFO / LAX / SFO
MIA/EWR/MIA
LGA/PIT
HKG/TPE/HKG/MNL/HKG
LGB/IAD
MIA/GRU/MIA
YUL/LGA
FLL/BOG/MDE/FLL SFO/LAX/SFO
下面我想检查一个示例。我有165个值,我需要检查这是否有助于您的建议。请参考列表B列。
BOG
BOM
GRU
JAL
MDE
MNL
THR
TUN
A sample of what I would like to check for is below. I have 165 values I need to check if that makes a difference in your suggestion. Please reference column B for this list.BOG
BOM
GRU
JAL
MDE
MNL
THR
TUN
提前谢谢!
推荐答案
根据您的描述,数据设置如下所示:
Based on your description, the data setup looks like this:
在单元格C2中复制下来是这个公式:
In cell C2 and copied down is this formula:
=SUMPRODUCT(COUNTIF(A2,"*"&$B$2:$B$11&"*"))>0
这篇关于检查一个单元格是否包含列表中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!