针对 table 列搜索特定文本的单元格,如果找到,return 即 table 列单元格值 - Excel

Search cell for specific text against table column and if found, return that table column cell value - Excel

我正在寻找针对 table 列搜索特定文本的单元格,如果找到,return table 单元格值。

这是我目前拥有的

=VLOOKUP(LOOKUP([@[Workbook Name]],Table10[List of Workbooks]),Table10[List of Workbooks],1,FALSE) 其中 returns #N/A

我想要的是 A 列有要搜索的字符串,B 列有搜索 table 和 return 匹配单元格的公式。

Col A                                                      Col B          
ALPH - Group Monthly -22-01-18-19-12-30.xlsm             Group Monthly
ALPH - Home Audit - DEPTS 1 - -22-01-18-16-10-14.xlsm     DEPTS 1

一种方法是:

=INDEX( Table10[List of Workbooks], 
        FILTER( SEQUENCE( ROWS( Table10[List of Workbooks] ) ), 
                ISNUMBER( FIND( Table10[List of Workbooks], [@[Workbook Name]] ) ) ) )

如果您希望它不区分大小写:

=INDEX( Table10[List of Workbooks], 
        FILTER( SEQUENCE( ROWS( Table10[List of Workbooks] ) ), 
                ISNUMBER( SEARCH( Table10[List of Workbooks], [@[Workbook Name]] ) ) ) )

如果有多个匹配项,它将溢出。如果你不想这样,请执行:

=INDEX( Table10[List of Workbooks],
        TRANSPOSE( FILTER( SEQUENCE( ROWS( Table10[List of Workbooks] ) ),
                           ISNUMBER( SEARCH( Table10[List of Workbooks], [@[Workbook Name]] ) ) ) ),
        1 )