[英]Sheets conditional formatting if contains text from another cell
I have a Google sheet which has a column for business name (A) and a column for city (B).我有一个 Google 工作表,其中有一列用于公司名称 (A) 和一列用于城市 (B)。 I would like to set conditional formatting such that if the city name is contained within the business name on the same row, the business name will be highlighted.我想设置条件格式,如果城市名称包含在同一行的企业名称中,则企业名称将突出显示。
Every row contains different business/city data, and there are thousands of rows.每行包含不同的业务/城市数据,并且有数千行。 I need one formula that will work for the whole sheet.我需要一个适用于整张纸的公式。
I know how to do it if the city name and business name are exactly the same =$A$2:$A=$B2
, but struggling to figure out how to do it if just a portion matches.如果城市名称和公司名称完全相同=$A$2:$A=$B2
,我知道该怎么做,但如果只有一部分匹配,我会努力弄清楚该怎么做。 Putting an asterisk before $B2 broke the formula.在 $B2 破坏公式之前放置一个星号。
=REGEXMATCH ($A2,$B2) would do the work too! =REGEXMATCH ($A2,$B2) 也可以完成这项工作!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.