E
EK
A B C D Result
1 2 3 4 D
1 2 4 3 C
3 1 2 4 D
4 3 2 1 A
I would like to know the formula to get Result.
1 2 3 4 D
1 2 4 3 C
3 1 2 4 D
4 3 2 1 A
I would like to know the formula to get Result.
Domenic said:Try...
E2, copied down:
=INDEX($A$1:$D$1,MATCH(MAX(A22),A2
2,0))
Hope this helps!
Dave Peterson said:The formula:
=INDEX($A$1:$D$1,MATCH(MAX(A22),A2
2,0))
Is return something from A11 (the headers)
It's gonna find the largest value in A22 with the max() function.
And look into A22 to find what column in that range has the maximum (the
0
means it has to be an exact match).
=Match() will return a 1, 2, 3, 4, ... depending on where the match was
found.
(1 for first element, 2 for second element, ....)
So =index(a1:d1,#) will return the value in the #th position of that range
(a1:d1).
======
If you plop some test data into a worksheet and then put the formula in
another
cell, you can highlight each piece of the formula and hit f9 to see what
it
evaluates to.
=INDEX($A$1:$D$1,MATCH(MAX(A22),A2
2,0))
select max(a2:d2) and hit f9
select match(----0) and hit f9
select all of it and hit f9.
=======
In later versions of excel (xl2002+), you can use
tools|formula auditing|evaluate formula
to do the same thing.