从动态数组中提取 Excel 单元格值
Extract an Excel cell value from dynamic array
我需要从 Excel 中的动态数组中提取单个值。我只想要我的 table 中“值”列中突出显示橙色的数字,名为“FRAM_abundance_harvest”。
下面的过滤器函数为我获取整行数据,但我只希望返回值 (356,034)。
`=FILTER(FRAM_abundance_harvest,((FRAM_abundance_harvest[Source]="Ocean") *
(FRAM_abundance_harvest[Abundance_Harvest]="Abundance") *
(FRAM_abundance_harvest[Mark status]="Marked") *
(FRAM_abundance_harvest[Run type]="Late") *
(FRAM_abundance_harvest[Production type]="Hatchery")))`
将整个公式放在一个INDEX()
函数中,如下图所示,
=INDEX(FILTER(FRAM_abundance_harvest,
((FRAM_abundance_harvest[Source]="Ocean") *
(FRAM_abundance_harvest[Abundance_Harvest]="Abundance") *
(FRAM_abundance_harvest[Mark Status]="Marked") *
(FRAM_abundance_harvest[Run Type]="Late") *
(FRAM_abundance_harvest[Production Type]="Hatchery")),""),,6)
或者,请注意,以下功能也需要 O365,
DROP() 功能仍在 Insider 的 BETA 频道中。
=DROP(FILTER(FRAM_abundance_harvest,
((FRAM_abundance_harvest[Source]="Ocean") *
(FRAM_abundance_harvest[Abundance_Harvest]="Abundance") *
(FRAM_abundance_harvest[Mark Status]="Marked") *
(FRAM_abundance_harvest[Run Type]="Late") *
(FRAM_abundance_harvest[Production Type]="Hatchery")),""),,5)
INDEX/MATCH
与 SUMIFS
在 Excel Table
中
第一次出现 (INDEX/MATCH)
- 这是一个数组公式(Ctrl,Shift+Enter).
=IFERROR(INDEX(FRAM_abundance_harvest[Value],
MATCH(1,(FRAM_abundance_harvest[Source]="Ocean")
*(FRAM_abundance_harvest[Abundance_Harvest]="Abundance")
*(FRAM_abundance_harvest[Run_Type]="Late")
*(FRAM_abundance_harvest[Production_Type]="Hatchery")
*(FRAM_abundance_harvest[Mark_Status]="Marked"),0)),"")
总和 (SUMIFS)
=SUMIFS(FRAM_abundance_harvest[Value],
FRAM_abundance_harvest[Source],"Ocean",
FRAM_abundance_harvest[Abundance_Harvest],"Abundance",
FRAM_abundance_harvest[Run_Type],"Late",
FRAM_abundance_harvest[Production_Type],"Hatchery",
FRAM_abundance_harvest[Mark_Status],"Marked")
- 如果找不到匹配项,第一个将 return "" 而第二个将 return 0.
- IMO,
SUMIFS
公式似乎更相关。
- 您可以为五列使用五个单元格,并将硬编码值替换为单元格引用。此外,您可以在提到的单元格中创建下拉菜单,并轻松更改五列不同值的结果。
我需要从 Excel 中的动态数组中提取单个值。我只想要我的 table 中“值”列中突出显示橙色的数字,名为“FRAM_abundance_harvest”。
下面的过滤器函数为我获取整行数据,但我只希望返回值 (356,034)。
`=FILTER(FRAM_abundance_harvest,((FRAM_abundance_harvest[Source]="Ocean") *
(FRAM_abundance_harvest[Abundance_Harvest]="Abundance") *
(FRAM_abundance_harvest[Mark status]="Marked") *
(FRAM_abundance_harvest[Run type]="Late") *
(FRAM_abundance_harvest[Production type]="Hatchery")))`
将整个公式放在一个INDEX()
函数中,如下图所示,
=INDEX(FILTER(FRAM_abundance_harvest,
((FRAM_abundance_harvest[Source]="Ocean") *
(FRAM_abundance_harvest[Abundance_Harvest]="Abundance") *
(FRAM_abundance_harvest[Mark Status]="Marked") *
(FRAM_abundance_harvest[Run Type]="Late") *
(FRAM_abundance_harvest[Production Type]="Hatchery")),""),,6)
或者,请注意,以下功能也需要 O365, DROP() 功能仍在 Insider 的 BETA 频道中。
=DROP(FILTER(FRAM_abundance_harvest,
((FRAM_abundance_harvest[Source]="Ocean") *
(FRAM_abundance_harvest[Abundance_Harvest]="Abundance") *
(FRAM_abundance_harvest[Mark Status]="Marked") *
(FRAM_abundance_harvest[Run Type]="Late") *
(FRAM_abundance_harvest[Production Type]="Hatchery")),""),,5)
INDEX/MATCH
与 SUMIFS
在 Excel Table
中
第一次出现 (INDEX/MATCH)
- 这是一个数组公式(Ctrl,Shift+Enter).
=IFERROR(INDEX(FRAM_abundance_harvest[Value],
MATCH(1,(FRAM_abundance_harvest[Source]="Ocean")
*(FRAM_abundance_harvest[Abundance_Harvest]="Abundance")
*(FRAM_abundance_harvest[Run_Type]="Late")
*(FRAM_abundance_harvest[Production_Type]="Hatchery")
*(FRAM_abundance_harvest[Mark_Status]="Marked"),0)),"")
总和 (SUMIFS)
=SUMIFS(FRAM_abundance_harvest[Value],
FRAM_abundance_harvest[Source],"Ocean",
FRAM_abundance_harvest[Abundance_Harvest],"Abundance",
FRAM_abundance_harvest[Run_Type],"Late",
FRAM_abundance_harvest[Production_Type],"Hatchery",
FRAM_abundance_harvest[Mark_Status],"Marked")
- 如果找不到匹配项,第一个将 return "" 而第二个将 return 0.
- IMO,
SUMIFS
公式似乎更相关。 - 您可以为五列使用五个单元格,并将硬编码值替换为单元格引用。此外,您可以在提到的单元格中创建下拉菜单,并轻松更改五列不同值的结果。