Index? Match? Function to sort and return value fr diff column in
Hi there,
Have spent hours trying to work this out! Hope someone can help.
My raw data is (A1:B6):
A 2
B 0
C 1
D 0
E 0
F 3
I want to sort column B values in descending order somewhere else in the
worksheet (say column K), and give the corresponding value from column A in
column J. Ie:
(J1:K6)
F 3
A 2
C 1
B 0
E 0
F 0
In order to calculate column K I have used: =large(B1:B6,n) where n = 1 to 6.
In order to calculate column J (say row 1) I have used:
=INDEX(A1:B6, MATCH(J1,B1:B6,0),1)
The problem with the MATCH (0) function is that it returns the first value
that is exaclt equal to the look up value. As such, some of the values
associated with the zeros are missed, and I get:
(J1:K6)
F 3
A 2
C 1
B 0
B 0
B 0
What can I do so that I get the following?
(J1:K6)
F 3
A 2
C 1
B 0
E 0
F 0
Thanks in advance!!
|