How to automatically split one row into different

2019-08-09 02:30发布

I'm trying to split one row in Google Sheets into different rows depending on its content. Here's an example:

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

Into:

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

How can I do this using a script or any other tools?

1条回答
Rolldiameter
2楼-- · 2019-08-09 02:49
=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

查看更多
登录 后发表回答