#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 161
Default Real-time sorting

Hi, adding pretty small fraction to the original value seems to be very smart
idea. Thanks for advice, believe this will finally solve Fernando's problem I
tried to help with.

"dhstein" wrote:

I see this is an old post, but I came across it and thought I'd put in my 2
cents anyway. I've done this type of dynamic sort many times. The method
you're using is fine. I do something similar with the RANK function and also
generate a column of data using the ROW function then find whatever values I
need with the INDIRECT function using row and column. Basically the same
thing you're doing. The one additional "trick" is in order to get unique
values with either LARGE or RANK I modify my values slightly by adding
RAND() / 10000 to each one. Assuming the numbers are large enough this
should not cause a problem and it makes each value unique.

"Fernando Ronci" wrote:

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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
REAL TIME CLOCK Jase Excel Discussion (Misc queries) 1 March 7th 08 09:37 PM
Collaborating in real time Kati Excel Discussion (Misc queries) 2 August 2nd 07 03:22 PM
Real time in worksheet Andri Excel Worksheet Functions 0 July 19th 06 04:06 PM
Real Time Charting lossofdog Excel Worksheet Functions 2 June 9th 06 03:19 PM
real-time countdown scottmiller Excel Worksheet Functions 2 September 27th 05 11:30 PM


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"