HELP!!: Sorting multiple selection AND inverted
Hey all!
I´m all lost at a problem I can´t seem to find a way to pass...
I´m building a macro to sort (RANK) inputs. But the whole problem is that that very rank is MOVABLE.
I explain:
- 2 ways I would do it.
1] Don´t know if Excel accepts at all! Is to rank columns, NOT ROWS
first round:
X Y Z
1 2,3 2,4 2,0
2
would become:
Z X Y <- GET´S REARRANGED AFTER SORT
1 2,0 2,3 2,4 <- GET´S REARRANGED AFTER SORT
2
SECOND ROUND:
Z X Y
1 2,0 2,3 2,4
2 2,3 2,1 2,8 <-NEW ENTRIES
would become:
X Z Y <- GET´S REARRANGED AFTER SORT
1 2,0 2,3 2,4 -stays constant! DOESN´T move
2 2,1 2,3 2,8 <- GET´S REARRANGED AFTER SORT
AND SO ON.
2]SECOND way.... this way is the one Excel accepts sorting: sorting elements vertically!
the whole scheme is kept... just change the following:
DATE1 DATE2 DATE3 <- DATEs are let out of sort =DONT move
1 X 2,1
2 Y 2,6
3 Z 2,0
would become:
1 Z 2,0
2 X 2,1
3 Y 2,6
PS: numbers are fixed!
SECOND ROUND:
(NEW) <- "NEW" IS THE NEW INPUT VALUES
1 Z 2,0 2,8
2 X 2,1 2,3
3 Y 2,6 2,5
would become:
(L) (NEW)
1 X 2,0 2,3
2 Y 2,1 2,5
3 Z 2,6 2,8
SEE... both (L) and (NEW) are ranked (sorted), while the other(s) are fixed. This will happen on end, so I´ll add NEW´s columns and this one plus the one with the letters (Range("B")) are to be ranked.
plz, help me! This is tricky. I need quick help. :(
thanks all!!
|