是否有任何自动方式来规范化谷歌表数据

问题描述 投票:1回答:2

我有一个超过3000行的数据集,我有一些这种格式的列 (A / B / C)==表(1)我希望用特定ID ==表(2)标准化每一行:

0

database google-sheets database-normalization google-sheets-formula
2个回答
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 !=''"))

0


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"))}

0

© www.soinside.com 2019 - 2024. All rights reserved.