我以为自己是个正派的床单骑师,但这是个强硬派。我只想使用公式将左侧变成右侧
也可以在https://docs.google.com/spreadsheets/d/1JgDZOV_K7SbOrCb27Z5K2XUBcrtq99GTCa3-BM2pOD0
进行采样我找到的最接近的是这个(Separating Comma List into Cells with Formula),但它也没有匹配。
答案 0 :(得分:0)
=ARRAYFORMULA(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(IFERROR(SPLIT(B1:B, ","))<>"", "♠"&A1:A&"♦"&SPLIT(B1:B, ","), ))
,,999^99)),,999^99), "♠")), "♦")))
答案 1 :(得分:0)
由@Matt:King替代:
=ARRAYFORMULA(QUERY(VLOOKUP(SEQUENCE(COUNTA(A2:A)*
COLUMNS(SPLIT(B2:B, ",")), 1, 0)/ COLUMNS(SPLIT(B2:B, ","))+2,
{ROW(A:A), A:A, TRIM(SPLIT(B:B, ","))}, MOD(SEQUENCE(COUNTA(A2:A)*
COLUMNS(SPLIT(B2:B, ",")), 1, 0), COLUMNS(SPLIT(B2:B, ",")))*{0, 1}+{2, 3}),
"where Col2 is not NULL"))