Excel Formula: how to split string by capital letters

前端 未结 3 1791
执笔经年
执笔经年 2021-01-16 19:38

Using a formula, not VBA, I would like to come up with a solution to split a string composed of multiple words. The formula should recognize the words where there is a capit

3条回答
  •  终归单人心
    2021-01-16 20:13

    In B2:C28 fill in these :

    A   ,A
    B   ,B
    C   ,C
    D   ,D
    E   ,E
    F   ,F
    G   ,G
    H   ,H
    I   ,I
    J   ,J
    K   ,K
    L   ,L
    M   ,M
    N   ,N
    O   ,O
    P   ,P
    Q   ,Q
    R   ,R
    S   ,S
    T   ,T
    U   ,U
    V   ,V
    W   ,W
    X   ,X
    Y   ,Y
    Z   ,Z
     ,   
    

    Note: B28 = , C28 =

    then in A2 =SUBSTITUTE(A1,B2,C2) then drag until A28,

    in A29 =RIGHT(A28,LEN(A28)-1) Done.

    Hope that helps. (:

    +------[edit]-----+

    or in one line :

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"Z",",Z"),"Y",",Y"),"X",",X"),"W",",W"),"V",",V"),"U",",U"),"T",",T"),"S",",S"),"R",",R"),"Q",",Q"),"P",",P"),"O",",O"),"N",",N"),"M",",M"),"L",",L"),"K",",K"),"J",",J"),"I",",I"),"H",",H"),"G",",G"),"F",",F"),"E",",E"),"D",",D"),"C",",C"),"B",",B"),"A",",A")," ,"," ")
    

提交回复
热议问题