EXCEL如何提取多个字符当中任何一个字符第一次出现的位置?

2024-12-12 23:53:11
推荐回答(5个)
回答1:

参考下面

Excel如何从一段文字中自动提取相关信息


回答2:

  1.  =MAX(IF(COUNTIF(A2,"*区*"),FIND("区",A2),0),IF(COUNTIF(A2,"*县*"),FIND("县",A2),0),IF(COUNTIF(A2,"*知*"),FIND("知",A2),0))

  2. =FIND(1,A2)

  3. =MID(A2,MAX(IF(COUNTIF(A2,"*区*"),FIND("区",A2),0),IF(COUNTIF(A2,"*县*"),FIND("县",A2),0),IF(COUNTIF(A2,"*知*"),FIND("知",A2),0))+1,FIND(1,A2)-MAX(IF(COUNTIF(A2,"*区*"),FIND("区",A2),0),IF(COUNTIF(A2,"*县*"),FIND("县",A2),0),IF(COUNTIF(A2,"*知*"),FIND("知",A2),0))-1)

回答3:

=IF(ISERROR(MID(A2,IF(ISERROR(IF(ISERROR(FIND("县",A2,1)),FIND("区",A2,1),FIND("县",A2,1))),FIND("知",A2,1),IF(ISERROR(FIND("县",A2,1)),FIND("区",A2,1),FIND("县",A2,1)))+1,FIND("1",A2,1)-IF(ISERROR(IF(ISERROR(FIND("县",A2,1)),FIND("区",A2,1),FIND("县",A2,1))),FIND("知",A2,1),IF(ISERROR(FIND("县",A2,1)),FIND("区",A2,1),FIND("县",A2,1)))-1)),"",MID(A2,IF(ISERROR(IF(ISERROR(FIND("县",A2,1)),FIND("区",A2,1),FIND("县",A2,1))),FIND("知",A2,1),IF(ISERROR(FIND("县",A2,1)),FIND("区",A2,1),FIND("县",A2,1)))+1,FIND("1",A2,1)-IF(ISERROR(IF(ISERROR(FIND("县",A2,1)),FIND("区",A2,1),FIND("县",A2,1))),FIND("知",A2,1),IF(ISERROR(FIND("县",A2,1)),FIND("区",A2,1),FIND("县",A2,1)))-1))

回答4:

方法之一

回答5:

假设数据在单元格A1
1、=SUM(IFERROR(FIND({"区","县","知"},A1),0))
ctrl+shift+enter结束输入
2、=FIND("1",A1)
3、=MID(A1,SUM(IFERROR(FIND({"区","县","知"},A1),0))+1,FIND("1",A1)-SUM(IFERROR(FIND({"区","县","知"},A1),0))-1)
ctrl+shift+enter结束输入