excel判断单元格中是否存在某个字符

2024-10-31 15:15:27
推荐回答(5个)
回答(1):

假设表格中C、E列是对应关系,现需要在F列填入以A列为关键字的,符合C、E列对应关系的值;

1、在F1单元格输入公式:=IFERROR(VLOOKUP(B1,C:E,3,0),"") 回车

见图一

2、选中F1下拉填充表格内的F列,

效果见图二


回答(2):

=if(and(countif(a1,"*a*"),countif(a1,"*b*")=0,countif(a1,"*c*")=0),1,if(and(countif(a1,"*b*"),countif(a1,"*a*")=0,countif(a1,"*c*")=0),2,if(and(countif(a1,"*c*"),countif(a1,"*b*")=0,countif(a1,"*a*")=0),3,if(and(countif(a1,"*a*"),countif(a1,"*b*")),4,0))))

回答(3):

=IF(ISNUMBER(SEARCH("A",A1)),1,IF(ISNUMBER(SEARCH("B",A1)),2,IF(ISNUMBER(SEARCH("C",A1)),3,IF(ISNUMBER(SEARCH("A",A1))*ISNUMBER(SEARCH("A",A1)),4,0))))

回答(4):

=IF(AND(ISERROR(FIND("a",A1))<>TRUE,ISERROR(FIND("b",A1))<>TRUE),4,IF(ISERROR(FIND("a",A1))<>TRUE,1,IF(ISERROR(FIND("b",A1))<>TRUE,2,IF(ISERROR(FIND("c",A1))<>TRUE,3,0))))

回答(5):

=IF(ISERROR(FIND("a",A1)&FIND("b",A1)),IF(ISERROR(FIND("a",A1)),IF(ISERROR(FIND("b",A1)),IF(ISERROR(FIND("c",A1)),"0","3"),"2"),"1"),"4")