excel search for multiple items

前端 未结 2 1445
耶瑟儿~
耶瑟儿~ 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:25

    You could use the combination of OR, IFERROR and SEARCH as you suggest, but I think the simpler construct would be ...

    =IF(AND(ISERROR(SEARCH("value1",A2)),ISERROR(SEARCH("value2",A2))),"Desktop","Laptop")

提交回复
热议问题