Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 6th, 2006, 03:58 PM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to aefavant Send a message via MSN to aefavant
Default 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!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Multiple selection DropDown surendran ASP.NET 2.0 Basics 1 September 26th, 2008 07:49 AM
Sorting and record Selection problem in GridView Dmitriy ASP.NET 3.5 Professionals 0 September 24th, 2008 03:18 PM
Multiple selection in Datagrid w/o RowHeaders debsoft General .NET 4 October 12th, 2006 11:30 AM
Multiple Selection of Listbox jasminecyriac ASP.NET 2.0 Basics 0 June 22nd, 2006 05:20 AM
inserting multiple selection from checkbox in to o [email protected] Pro JSP 0 March 30th, 2006 12:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.