Excel Exact Word Matching

前端 未结 5 852
遥遥无期
遥遥无期 2021-01-23 00:38

Let\'s say I have \"Vegas is great\" in cell A1. I want to write a formula that looks for the exact word, \"gas\" in cells. Vegas ≠ gas, but the only search formula I\'m finding

5条回答
  •  逝去的感伤
    2021-01-23 01:06

    I think this will handle all the cases that you are planning to handle:

    =OR(ISNUMBER(SEARCH(" gas",LOWER(A1), 1 )), LEFT(A1,3)= "gas")
    

    I added a space before the "gas" in the search. And if the gas was the only word in the cell or the first word in the cell, the right part of this function handles that case.

提交回复
热议问题