首页 > 解决方案 > Google Sheets - Check if any string from column is in certain cell?

问题描述

I have a column of strings, e.g.

A1: A A2: B A2: C

And I want a formula to check if any of those strings are in another cell, say B2. Is this possible with google sheets? FIND only seems to work on single strings and doesn't appear to accept a range of cells.

标签: google-sheets

解决方案


如果您的字符串在 ColumnA 中(在单独的单元格中),那么可能:

=REGEXMATCH(B2,textjoin("|",1,A1:A))

(区分大小写。)


推荐阅读