How to automatically split one row into different rows in Google Sheets?

醉酒当歌 提交于 2020-01-05 07:03:36

问题


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:


=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), "♥")), "♦")))



来源:https://stackoverflow.com/questions/56420002/how-to-automatically-split-one-row-into-different-rows-in-google-sheets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!