View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Fernando Ronci Fernando Ronci is offline
external usenet poster
 
Posts: 14
Default Real-time sorting

Thanks!
We're almost there. VLOOKUP(LARGE(($E$10:$E$14),ROW()),$E$10:$F$14,2,0 )
works as long as the numbers in E10:E14 are different. If two or more
numbers in E10:E14 are equal, their corresponding labels shown in B1:B5 are
repeated.
Look at the following three examples (in value/label pairs) to see what I
mean:

EXAMPLE #1:
Input Data:
2, L1
5, L2
8, L3
2, L4
2, L5

This is what the VLOOKUP function mentioned above shows. See that L1 is
repeated three times:
8, L3
5, L2
2, L1
2, L1
2, L1

What I want is this:
8, L3
5, L2
2, L1
2, L4
2, L5


EXAMPLE #2:
Input Data:
2, L1
1, L2
8, L3
2, L4
1, L5

This is what the VLOOKUP function shows. See that L1 and L2 are repeated
twice each:
8, L3
2, L1
2, L1
1, L2
1, L2

What I want is this:
8, L3
2, L1
2, L4
1, L2
1, L5


EXAMPLE #3:
Input Data:
2, L1
2, L2
2, L3
2, L4
2, L5

This is what the VLOOKUP function shows (this is ridicously wrong as L1 is
repeated 5 times):
2, L1
2, L1
2, L1
2, L1
2, L1

What I want is this:
2, L1
2, L2
2, L3
2, L4
2, L5

How do I have to tweak the formula to pick different labels for the same
values ?

Thanks again,
Fernando


"Alojz" wrote in message
...
Hi, am not sure whether without, but definitely possible with auxiliary
column.
Array enter in E10:E14 =A10:A14+B10:B14+C10:C14+D10:D14
Insert in F10:F14 ur label.
To see correctly sorted labels in B2:B5, array-enter:
=VLOOKUP(LARGE(($E$10:$E$14),ROW()),$E$10:$F$14,2, 0)
To see labels correctly sorted u do not even need A1:A5, as formula
sorting
labels does not use it referring to auxiliary column E. So, if u need to
see
just labels sorted, u can delete A1:A5.