答案 0 :(得分:0)
=ARRAYFORMULA(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "where Col3 !=''"))
答案 1 :(得分:0)
={X1:Y1, "ID_RF", Z1;
ARRAYFORMULA(QUERY({QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "where Col3 !=''"), TRANSPOSE(SPLIT(JOIN(",", REPT(SPLIT(
QUERY(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "where Col3 !=''"),
"select Col2,count(Col2) where Col2 is not null group by Col2 label count(Col2)''"),
",")&",", QUERY(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "where Col3 !=''"),
"select count(Col2) where Col2 is not null group by Col2 label count(Col2)''"))),
","))&COUNTIFS(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "select Col2 where Col3 !=''"),
QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "select Col2 where Col3 !=''"), ROW(INDIRECT("A1:A"&
COUNTA(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "select Col2 where Col3 !=''")))), "<="&ROW(INDIRECT("A1:A"&COUNTA(
QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "select Col2 where Col3 !=''")))))}, "select Col1,Col2,Col4,Col3"))}
答案 2 :(得分:-1)
我有类似如下的要求。
https://i.stack.imgur.com/rEqLN.png
需要从colD中拆分数据,以下是已使用的公式。
=ARRAYFORMULA(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(C5:C), "♠"&C5:C&"♦"&SPLIT(D5:D, ","), )), , 999^99)), , 999^99),
"♠")), "♦")), "where Col2 !=''"))