如何在单个单元格中获取查找值的所有值(特定列)?

问题描述 投票:0回答:3

我有标头(dptype,day,batchtimings)。如何在另一个工作表的单个单元格中获取单个查找值的多个(day和batch-timings值?示例:

Dp type  |  day        |batchtimings  
---------|-------------|----------------
 a       |  Saturday   |    10-11
 b       |  friday     |    11-12
 a       |  monday     |    01-02
 y       |  tuesday    |    02-03
 b       |  sunday     |    04-05
 a       |  wednesday  |    04-07
 c       |  sunday     |    03-04
 a       |  friday     |    10-12
 v       |  monday     |    10-11
 b       |  thursday   |    11-12
 y       |  monday     |    09-10

我要在单个单元格中唯一的dptype的全天和批量计时值(唯一)

我想要的例子

dp type    batches
------------------------------
        |    Saturday:10-11
  a     |    monday :1-2
        |    wednesday:4-7
        |    friday:10-12
--------|--------------------       
  b     |    friday:11-12
        |    Sunday:4-5
        |    thursday:11-12
--------|--------------------
  y     |    tuesday:2-3
        |    monday:9-10
google-sheets google-sheets-formula transpose array-formulas google-sheets-query
3个回答
1
投票

获取您的唯一类型列表:

=UNIQUE(A2:A12)

然后用以下引用:

=join(char(10),UNIQUE(FILTER(B:B&":"&text(C:C,"mm-dd"),A:A=F1)))

enter image description here


0
投票

您可以尝试

=IFNA( JOIN (" :"), FILTER(B1:C10, A1:A10="A"))

您将在何处将值替换为所需的内容

enter image description here


0
投票

用途:

=ARRAYFORMULA({SORT(UNIQUE(FILTER(A2:A, A2:A<>""))), TRANSPOSE(SUBSTITUTE(TRIM(
 QUERY(QUERY(QUERY(UNIQUE({A2:C, B2:B&":"&TO_TEXT(C2:C)}), 
 "select max(Col4) where Col1 is not null group by Col2 pivot Col1"), 
 "offset 1", 0),,999^99)), " ", CHAR(10)))})

0

© www.soinside.com 2019 - 2024. All rights reserved.