EDIT: Likely an easy question, basically I have three values, let's say 9, 4 and 7 in different cells (not in a table), I want to find the minimum in an order then return its relative position, for example: 9,4,7 would return 2 as 4 is the minimum and is positioned second.
What is the correct excel formula to do so? Thanks .
Solution: Thanks all for your help, I didn't think excel could do if it wasn't continuous. I've ended up using a series of nested IF statements, an AND statement and < signs, to get the job done :)
You can simply;
Ah, after clarification;
I can't think of a way to do that with a formula, it can be done with VBA (Assumes all numeric cells + the highest index is returned in the result of a clash)
Here's an array formula that should work. It assumes the values are in A1, C3, and B4.
=MAX(IF(CHOOSE(TRANSPOSE({1,2,3}),$A$1,$C$3,$B$4)=MIN($A$1,$C$3,$B$4),TRANSPOSE({1,2,3}),0))
Unfortunately, Excel lookup functions want continuos range of data.
For a set of random cells, use something like:
Usage:
Array formula:
where the range
B$16:M$16
has the indices (i.e. 1, 2, 3, 4, etc), andB23:M23
has the values being considered.min:
=MIN(A1,B2,C3)
position:
=MATCH(2,1/FREQUENCY(min,(A1,B2,C3)))