excel search for multiple items

前端 未结 2 1396
耶瑟儿~
耶瑟儿~ 2021-01-25 22:02

I am trying to search for multiple items in a cell. If any of the terms I am looking for is present, I want cell D to display \"Laptop\", otherwise, display \"Desktop\". I can g

2条回答
  •  抹茶落季
    2021-01-25 22:44

    This should work:

    =IF(SUM(COUNTIF(A2,"*" &{"blah1";"blah2";"blah3"}& "*"))>0,"laptop","desktop")
    

提交回复
热议问题