简体   繁体   English

查找范围以查找名称,如果单元格包含名称,则返回特定文本

[英]Lookup range to find name, return specific text if cell contains the name

trying to write a formula that will lookup a range based on text in column A and return what the person is working on. 尝试编写一个公式,该公式将根据A列中的文本查找范围并返回此人正在从事的工作。 For example, I want the formula to look at cell A1 (John), and find if John exists in the range. 例如,我希望公式查看单元格A1(约翰),并查找该范围内是否存在约翰。 If he does, then I want it to return what he's working on (Deep Fry Station). 如果他这样做了,那么我希望它返回他正在研究的内容(油炸站)。 Or if it's Wayne, I want it to return "Packer". 或者,如果是Wayne,我希望它返回“ Packer”。

在此处输入图片说明

Use TRIM, MID, SUBSTITUTE and REPT to retrieve the 'piece' that you want with wrapping IFERRORs to compensate for no matches. 使用TRIM,MID,SUBSTITUTE和REPT检索所需的“件”,并包装IFERROR以补偿不匹配的情况。

在此处输入图片说明

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

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