我最近写了一个公式来排列.csv格式的Excel列表,以使其更具可读性,而且我遇到了一个异常错误。它说:“此公式缺少范围参考或定义的名称。”我检查了公式,似乎找不到任何错误,因此,如果有人可以帮助我,我将不胜感激。
代码如下:
=IF(EXACT(MID(A2,LEN(A2)-1,2),";;"), MID(MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(A2)),1,FIND(";;",MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(A2)))-1),IF(MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)>2,MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";""",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND("#",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+1)+2,MID(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))),1,LEN(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))))-LEN(CONCAT(""";",IF(ISERROR(FIND(";",LEFT(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))),LEN(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))))-1))),LEFT(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))),LEN(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))))-1),RIGHT(LEFT(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))),LEN(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))))-1),LEN(LEFT(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))),LEN(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))))-1))-FIND("~",SUBSTITUTE(LEFT(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))),LEN(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))))-1),";","~",LEN(LEFT(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))),LEN(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))))-1))-LEN(SUBSTITUTE(LEFT(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))),LEN(MID(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))),FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))+2,LEN(MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))-FIND(";",MID(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))),FIND(";",TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))+1,LEN(TEXTJOIN(",",FALSE,A2:INDIRECT(ADDRESS(CELL("row",A2),MATCH(TRUE,INDEX(ISBLANK(2:2),0,0),0)-1))))))))-1),";",""))))))))-1)),MID(MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(MID(A2,FIND(";",A2)+1,LEN(A2)))-FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))-1),1,LEN(MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(MID(A2,FIND(";",A2)+1,LEN(A2)))-FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))-1))-LEN(CONCAT(";",IF(ISERROR(FIND(";",MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(MID(A2,FIND(";",A2)+1,LEN(A2)))-FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))-1))),MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(MID(A2,FIND(";",A2)+1,LEN(A2)))-FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))-1),RIGHT(MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(MID(A2,FIND(";",A2)+1,LEN(A2)))-FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))-1),LEN(MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(MID(A2,FIND(";",A2)+1,LEN(A2)))-FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))-1))-FIND("~",SUBSTITUTE(MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(MID(A2,FIND(";",A2)+1,LEN(A2)))-FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))-1),";","~",LEN(MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(MID(A2,FIND(";",A2)+1,LEN(A2)))-FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))-1))-LEN(SUBSTITUTE(MID(MID(A2,FIND(";",A2)+1,LEN(A2)),FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))+1,LEN(MID(A2,FIND(";",A2)+1,LEN(A2)))-FIND(";",MID(A2,FIND(";",A2)+1,LEN(A2)))-1),";","")))))))))))
编辑:所需输出为逗号分隔的字符串message
中的字符串;userdata;date;message;attachment(if there is one);
。这些是正常的对话消息,并且经常出现逗号,这会切断当前单元格中的消息,并将其余部分拆分到左侧的单元格1列中。
示例:
<A1>;james-1029;2018-09-10 1:40 PM;hi guys;hello.png;
<A2>;nope-8888;2018-09-10 1:41 PM;"Why
<B2> hello
<C2> james";;
<A3>;username-7473;2018-09-10 1:45 PM;hey to you as well;;
所需的输出:
<D1>hi guys
<D2>Why, hello, james
<D3>hey to you as well