简体   繁体   English

Excel #value 错误将动态数组公式的结果传递给另一个 function

[英]Excel #value error passing result of dynamic array formula to another function

I have the following data in columns A and B. I want to filter the table by group 1 to return only the group 2 values as an array and the perform an operation on that array (in this case RANK )我在 A 列和 B 列中有以下数据。我想按组 1 过滤表,以仅将组 2 值作为数组返回并对该数组执行操作(在本例中为RANK

If I do that as 2 steps, it works just fine如果我分两步做,它工作得很好

D2 formula is =TRANSPOSE(INDEX(FILTER($A$2:$B$12,$A$2:$A$12=A2), ,2)) (I put the transpose just to make readable) and the I2 Formula is =RANK.EQ(B2, D2:G2) D2公式是=TRANSPOSE(INDEX(FILTER($A$2:$B$12,$A$2:$A$12=A2), ,2)) (我把转置只是为了便于阅读)并且I2公式是=RANK.EQ(B2, D2:G2)

在此处输入图像描述

If I try to enter the function as =RANK.EQ(B2,INDEX(FILTER($A$2:$B$12,$A$2:$A$12=A2), ,2))如果我尝试输入 function 作为=RANK.EQ(B2,INDEX(FILTER($A$2:$B$12,$A$2:$A$12=A2), ,2))

I get a #value cell error as an array, the same shape as the result of the filter我得到一个#value单元格错误作为数组,与过滤器结果的形状相同

Can anyone help me avoid the intermediate step and figure out how to get this into a single formula?谁能帮我避免中间步骤并弄清楚如何将它变成一个公式? thanks in advance.提前致谢。

在此处输入图像描述

AMEND Thanks to @JvdV for a solution using an alternative aproach - I would be interested to know why I cant get around the error - what is it about the return value of one function that prevents me passing it to the next function?修正感谢@JvdV使用替代方法的解决方案 - 我很想知道为什么我无法绕过错误 - 一个 function 的返回值阻止我将其传递给下一个 function 的原因是什么? Thanks all谢谢大家

Maybe just use COUNTIFS() :也许只使用COUNTIFS()

在此处输入图像描述

Formula in D2 : D2中的公式:

=COUNTIFS(A2:A12,A2:A12,B2:B12,">"&B2:B12)+1

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

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