WPS中判断单元格内包含多条两个不同字符,并输出多条判断的结果?
发布网友
发布时间:2022-05-23 07:43
我来回答
共2个回答
热心网友
时间:2023-10-17 01:06
在C1中输入或复制粘贴下列公式
=IF(ISNUMBER(FIND("北方",A1)),"北",IF(ISNUMBER(FIND("南方",A1)),"南",""))&IF(ISNUMBER(FIND("吃的",A1)),"吃",IF(ISNUMBER(FIND("喝的",A1)),"喝",IF(ISNUMBER(FIND("穿的",A1)),"穿","")))
或
=IF(LEN(A1)-LEN(SUBSTITUTE(A1,"北方",))>0,"北",IF(LEN(A1)-LEN(SUBSTITUTE(A1,"南方",))>0,"南",""))&IF(ISNUMBER(FIND("吃的",A1)),"吃",IF(ISNUMBER(FIND("喝的",A1)),"喝",IF(ISNUMBER(FIND("穿的",A1)),"穿","")))
下拉填充追问这种结果是拼接出来的,有直接判断两个条件满足之后,然后输出一个字符串的方法吗?
热心网友
时间:2023-10-17 01:07
C1用公式:
=LOOKUP(,0/FIND({"北","南"},A1),{"北","南"})&LOOKUP(,0/FIND({"吃","喝","穿"},A1),{"吃","喝","穿"})
下拉。