【问题标题】:How to automatically split one row into different rows in Google Sheets?如何在 Google 表格中自动将一行拆分为不同的行?
【发布时间】:2019-06-03 00:39:38
【问题描述】:

我正在尝试根据内容将 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

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

【问题讨论】:

  • 你想保留那些; ??
  • 不,已经编辑过了。谢谢@player0

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


【解决方案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), "♥")), "♦")))

【讨论】:

  • 谢谢@player0,只有一个问题:形状有什么用?
  • 只是 SPLIT 的分隔符。它没有任何意义。你可以使用任何你想要的符号,但它应该是唯一的
  • 另一个问题:999^99 是干什么用的?
  • 也没什么 :) 只是一个很大的数字,所以查询会处理那么多行(理论上)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-03-02
  • 1970-01-01
  • 1970-01-01
  • 2022-06-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多