如何在Google表格中自动将一行拆分为不同的行?

时间:2019-06-03 00:39:38

标签: google-sheets transpose google-sheets-formula array-formulas google-sheets-query

我正在尝试根据其内容将Google表格中的一行拆分为不同的行。这是一个示例:

Name    | Ticker | Categories
Bitcoin | BTC    | currency; store-of-value; trust layer; smart contracts; cross-industry
Ripple  | XRP    | currency; cross-industry

进入:

Name    | Ticker | Categories
Bitcoin | BTC    | currency 
Bitcoin | BTC    | store-of-value 
Bitcoin | BTC    | trust layer
Bitcoin | BTC    | smart contracts 
Bitcoin | BTC    | cross industry
Ripple  | XRP    | currency
Ripple  | XRP    | cross-industry

如何使用脚本或任何其他工具来做到这一点?

1 个答案:

答案 0 :(得分:1)

=ARRAYFORMULA(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
 IF(IFERROR(SPLIT(C1:C, ";"))<>"", "♥"&A1:A&"♦"&B1:B&"♦"&
 IFERROR(SPLIT(C1:C, ";")), )),,999^99)),,999^99), "♥")), "♦")))

0