【问题标题】:How to merge 2 tabs into 1 result? (Google Sheet)如何将 2 个选项卡合并为 1 个结果? (谷歌表)
【发布时间】:2021-01-07 19:45:46
【问题描述】:

我有 2 个标签,分别命名为 A 类和 B 类,如下所示:

我的问题是如何通过查询将这些数据合并为 1 个结果?而我想要的结果是这样的:

链接:https://docs.google.com/spreadsheets/d/1xmUMlprKNh1r6O81KuLtaNOQchx5sYn_ihirkG9tzWk/edit?usp=sharing 提前致谢

【问题讨论】:

  • 分享您的工作表副本

标签: google-sheets google-sheets-formula


【解决方案1】:

尝试:

=QUERY({
 QUERY('Class A'!A3:A, "select 'Class A',A");
 QUERY('Class B'!A3:A, "select 'Class B',A")}, 
 "where Col2 is not null", 0)


更新:

=INDEX(QUERY(SPLIT({
 IF('Class A'!A3:A="",,'Class A'!A1&"♦"&'Class A'!A3:A);
 IF('Class B'!A3:A="",,'Class B'!A1&"♦"&'Class B'!A3:A)}, "♦"), 
 "where Col2 is not null", 0))

【讨论】:

  • 谢谢,但我可以从 A1 获得值 Class AClass B 而不是像那样硬编码吗?再次感谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-05-29
  • 2013-11-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多