简体   繁体   English

从特定列表中查找单元格中区分大小写的字符串,然后从列表中返回值

[英]Finding case sensitive string in a cell from a specific list and return a value from the list

I am stumped. 我感到难过。

I need Excel to search in a cell (Sheet 1, column a) and find a specific string of text from a list (Sheet 2, column a). 我需要Excel在一个单元格(第1页,第a列)中搜索,并从列表(第2页,第a列)中找到特定的文本字符串。 Then if it finds that specific string of text from the list (Sheet 2, column a), I need it to return the value from the list (Sheet 2, column b) in the cell (Sheet 1, column B). 然后,如果它从列表(Sheet 2,a列)中找到了特定的文本字符串,我需要它来从单元格(Sheet 1,B列)中的列表(Sheet 2,b列)中返回值。

I appreciate any assistance. 感谢您的协助。 Sorry if I am not clear. 对不起,如果我不清楚。

  • Rico 波多黎各

Neither VLOOKUP or MATCH are case-sensitive so if you want a case sensitive match try this version VLOOKUPMATCH都不区分大小写,因此如果您要区分大小写,请尝试使用此版本

=INDEX(Sheet2!B$1:B$100,MATCH(TRUE,INDEX(EXACT(Sheet1!A1,Sheet2!A$1:A$100),0),0)) = INDEX(Sheet 2中B $ 1:B $ 100中,MATCH(TRUE,INDEX(EXACT(Sheet 1中A1,Sheet 2中A $ 1:!US $ 100),0),0))

EXACT is the case-sensitive part..... EXACT是区分大小写的部分.....

Note: I restricted the lookup ranges to 100 rows, expand as required 注意:我将查找范围限制为100行,并根据需要扩展

通过错误检查,它将在单元格中搜索区分大小写的字符串,而不是要求该单元格完全是区分大小写的字符串:

=IF(COUNT(INDEX(FIND(Sheet2!$A$1:$A$10,A1),)),INDEX(Sheet2!$B$1:$B$10,MATCH(TRUE,INDEX(ISNUMBER(FIND(Sheet2!$A$1:$A$10,A1)),),0)),"")

Assuming the following: 假设以下内容:

  • Sheet 1, column a = Sheet1!A:A 工作表1的a列=工作表1 Sheet1!A:A
  • Sheet 1, column b = Sheet1!B:B 工作表1列b =工作表1 Sheet1!B:B
  • Sheet 2, column a = Sheet2!A:A 表格2,列a =表格2 Sheet2!A:A
  • Sheet 2, column b = Sheet2!B:B 工作表2列b =工作表2 Sheet2!B:B

You can simply insert an INDEX MATCH into Sheet1!B1 您可以简单地将INDEX MATCH插入Sheet1!B1

=INDEX(Sheet2!B:B,MATCH(Sheet1!A1,Sheet2!A:A,0))

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

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