简体   繁体   English

使用索引返回多个字符串值,匹配多个条件

[英]Returning multiple string values using index,match on multiple criteria

I have a google form populating an ever-growing spreadsheet from which I would like to generate an overview sheet as a daily report. 我有一个谷歌表格,填写了一个不断增长的电子表格,我想从中生成一份概述表作为每日报告。

Here is an excerpt from "Form Responses 1" 以下是“表单回复1”的摘录

https://pasteboard.co/I74RboO.png

I am successfully using an index/match (matching on both the property name (col C) and yesterday's date (col F)) to return a string value (Col H) but I am struggling to return more than one instance of a match EG: rows 416 / 417. 我成功地使用索引/匹配(匹配属性名称(col C)和昨天的日期(col F))来返回字符串值(Col H),但我很难返回一个匹配EG的多个实例:416/417行。

As the result is a string, all the tutorials I can find (which use small()) don't appear to work. 结果是一个字符串,我可以找到的所有教程(使用small())似乎不起作用。 I am relatively new to excel so may be missing something. 我对excel比较陌生,所以可能会遗漏一些东西。

everything I have tried which is mainly small() give me a #num! 我尝试的一切主要是小()给我一个#num! error so I am guessing that small is the wrong way to go, but cannot google up an alternative. 错误,所以我猜这是小错误的方式,但不能谷歌另类。

Formula I am trying is 我正在尝试的公式是

Formula in E4: E4中的公式:

{=INDEX('Form Responses 1'!$H:$H,SMALL(MATCH(1,($E$3='Form Responses 1'!$F:$F)*($B$4='Form Responses 1'!$C:$C),0),ROW(1:1)))}

Formula in E5: E5中的公式:

{=INDEX('Form Responses 1'!$H:$H,SMALL(MATCH(1,($E$3='Form Responses 1'!$F:$F)*($B$4='Form Responses 1'!$C:$C),0),ROW(2:2)))}

Which works on the first instance (row 4) but not row 5: 哪个适用于第一个实例(第4行)但不适用于第5行:

https://pasteboard.co/I74WbYE.png

There may be up to 5 or so rows for the 2 matches (historically) so I need to be able to present these in a readable form. 2个匹配(历史上)最多可能有5行左右,所以我需要能够以可读的形式呈现这些行。 Currently I am using excel but will need to port to google forms and post out automatically on the daily. 目前我正在使用Excel,但需要移植到谷歌表格并在每日自动发布。

Any help gratefully received. 任何帮助感激不尽。

Here is an example for you to try out in a simplified way 以下是您以简化方式试用的示例

      A     B        C            D        E       F          G
1     CH    Red      999
2     DE    Red      654'321                       Blue
3     FR    Green    43'213                        DE
4     CH    Green    74'123
5     DE    Green    4'651                 1       6'541      645'132
6     SA    Blue     6'541                 2       3'120      135'561
7     CH    Blue     3'120                 3       645'132    #NUM!
8     DE    Blue     645'132               4       148'085    #NUM!
9     CH    Red      179'395               5       141'823    #NUM!
10    DE    Red      173'133               6       135'561    #NUM!
11    SA    Green    166'871                
12    CH    Green    160'609
13    DE    Green    154'347
14    SO    Blue     148'085
15    CH    Blue     141'823
16    DE    Blue     135'561

.

Column F: Single criteria : Only "Blue" --> 6 occurences F栏: 单一标准 :仅“蓝色” - > 6次出现

in F5 I have 在F5我有

=INDEX($C$1:$C$18,SMALL(IF($B$1:$B$18=$F$2,ROW($B$1:$B$18)-ROW(INDEX($B$1:$B$18,1,1))+1),E5))

Column G: Multiple cliteria: "Blue" & "DE" --> 2 occurences G栏: 多个cliteria: “蓝色”和“DE” - > 2个出现

in G5 I have 在G5我有

=INDEX($C$1:$C$18,SMALL(IF($B$1:$B$18=$F$2,IF($A$1:$A$18=$F$3, ROW($A$1:$A$18)-ROW(INDEX($A$1:$A$18,1,1))+1)),E5))`

Careful: those are array formulas -> press Ctrl + Shift + Enter when inputting the formula 小心:这些是数组公式 - >输入公式时按Ctrl + Shift + Enter

in this example, the Nth value is defined by the 1-6 numbers in column E 在该示例中,第N个值由列E中的1-6个数字定义

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM