I want to use conditional formatting using another column as a reference. Lets lock for this example
我想使用另一列作为参考的条件格式。让我们锁定这个例子
A | B
cat.12.30.dog | cat
cow.3.cat | dog
cat.bus | truck
car.truck |
bus.dog.cat |
truck |
dog |
So I want to highlight cells in column A which begins with any word from column B therefor as a result of what I mean in the example I should get those cells highlighted
所以我想突出显示A列中的单元格,这些单元格以B列中的任何单词开头,因为我在示例中的意思是我应该突出显示这些单元格
cat.12.30.dog
cat.bus
truck
dog
I have tried (=SUM) but it didn't work as I want, So I am asking for any way to do this task
我试过(= SUM),但它没有按我的意愿工作,所以我要求任何方式来完成这项任务
Best regards
1 个解决方案
#1
0
Use this formula:
使用此公式:
=NOT(ISERROR(MATCH(1,IF(ISERROR(SEARCH($B$1:$B$3,A1)),0,SEARCH($B$1:$B$3,A1)),0)))
The result will be like this:
结果将是这样的:
Make sure you do not have trailing/leading spaces.
Hope this helps.
确保没有尾随/前导空格。希望这可以帮助。
#1
0
Use this formula:
使用此公式:
=NOT(ISERROR(MATCH(1,IF(ISERROR(SEARCH($B$1:$B$3,A1)),0,SEARCH($B$1:$B$3,A1)),0)))
The result will be like this:
结果将是这样的:
Make sure you do not have trailing/leading spaces.
Hope this helps.
确保没有尾随/前导空格。希望这可以帮助。