问题
Background:
Short question on the use of array references within RANK
or RANK.EQ
function.
Both function got the following parameters: ....(number,ref,[order])
Ms.Documentation about the Ref
parameter within RANK
and RANK.EQ
:
"Ref Required. An array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored."
Also, other websites I would normally highly recommend, would state that the use of an array or list is possible within the Ref
parameter.
Sample data:
| Rank1 | Rank2 | Overall |
|-------|-------|---------|
| 1 | 3 | |
| 1 | 1 | |
| 3 | 2 | |
Tried function:
According to the documentation, the following in C2
should work:
=RANK(A2+B2,INDEX(A$2:A$4+B$2:B$4,))
This evaluates to (using the build-in function):
=RANK(4,{4,2,5})
However returns, #VALUE
error.
Question:
Can we state that only range references work as the Ref
parameter and arrays simply don't work? Or am I missing some important piece of information here? Any canonical answer is welcome, I just want to make sure my hypothesis is correct.
For this specific case, to replicate the RANK
, I would instead have to use something like:
=SUMPRODUCT(--(($A$2:$A$4+$B$2:$B$4)<(A2+B2)))+1
回答1:
Arrays don't work. They never have either, to the best of my recollection; the documentation is just wrong.
来源:https://stackoverflow.com/questions/59374601/rank-rank-eq-function-array-reference-error