简体   繁体   English

如何使用结构化引用创建数组公式?

[英]How to do an array formula with a structured reference?

I need to calculate the MEDIAN of the rows matching some conditions. 我需要计算匹配某些条件的行的中MEDIAN

Conditions are in the rows A, B, C and D and my infos are in a table called classic_v2_log . 条件在A,B,C和D行中,而我的信息在名为classic_v2_log的表中。 When I'm using the Sheet Name it works: 当我使用工作表名称时,它可以工作:

=MEDIAN(IF((ClassicRAW!B:B=A35)*(ClassicRAW!C:C=B35)*(ClassicRAW!D:D=C35)*(ClassicRAW!E:E=D35),ClassicRAW!F:F))

But if I try to use the Table reference it gives me a #N/A and if I try to use the Show Calculation Steps it goes beyond the Table. 但是,如果我尝试使用表引用,它将给我#N/A ;如果我尝试使用“ Show Calculation Steps它将超出表。

I'm trying something like this and it's not working: 我正在尝试类似的方法,但是它不起作用:

=MEDIAN(IF((classic_v2_Log[ [ Epochs] ]=A35),ClassicRAW!F:F))

I am confirming the formula with Ctrl+Shift+ENTER to make it as an array-formula. 我正在使用Ctrl + Shift + ENTER确认公式,以使其成为数组公式。

The essential point is that the two ranges (arrays) need to be the same size. 重要的一点是两个范围(数组)的大小必须相同。 If one of the ranges is in a table and the other isn't you will have to ensure the second is the same number of rows as the first. 如果一个范围在表中,而另一个不在表中,则必须确保第二个与第一个相同。

For example, if your table ran from row 2 to row 50: 例如,如果您的表从第2行运行到第50行:

=MEDIAN(IF((classic_v2_Log[ [ Epochs] ]=A35),ClassicRAW!F2:F50))

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

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