Go Back   Trackpads Community > General Discussions > Computer and Technology > Microsoft Applications

Microsoft Applications Discussions about Windows and other MS Products such as Office

Reply
 
LinkBack Thread Tools
Old 01-28-2005, 08:00   #1 (permalink)
Douglas
Civilians

 
Default How do i sort a range and place the results in another range without using Macros?

I have a worksheet that has a table of data.
The table spans cells B2 - Q72

I would like to place the same table of data underneath it but sorted
by one of the colums in Ascending Order, then the same again
underneath that but this time sorted in Descending order.

eg:

|
|Table of Data
|
|
|Table sorted in Ascending Order
|
|
|Table sorted in Descending Order
|



so when data is changed in the top table the sort orders in the tables
underneath are reflected as well.

I would like this to happen automatically when data is entered and not
by manually running a macro to update all the time?

Is this possible?
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Old 01-28-2005, 12:00   #2 (permalink)
Bernie Deitrick
Civilians

 
Default Re: How do i sort a range and place the results in another range without using Macros?

Douglas,

You need to insert formulas in column A that ranks the values. You can use
RANK if you have numeric values, or a formula like this in cell A2, copied
down to A3:A72:

=SUMPRODUCT(($B$2:$B$72<=B2)*1)

to rank based on column B. If you can have ties, you need to add something,
like

=SUMPRODUCT(($B$2:$B$72<=B2)*1) + ROW()/1000

and then do a numeric RANK on that value, in yet another column.

Then, to create your auto-sorting tables, use a VLOOKUP keyed to rank
numbers (from 1 to 72 for the first table, and 72 to 1 for the second table)
in column A. Let's say that the top left cell of your first auto-sorted
table is B80. Use this formula, and copy to B80:Q151:

=VLOOKUP($A80,$A$2:$Q$72,COLUMN(),FALSE)

Then make your second table, and you're done.

If you can't get it to work, post back and I will send you a working
version.

HTH,
Bernie
MS Excel MVP

"Douglas" <dougsdir24@yahoo.com> wrote in message
news:befb84ec.0501280155.c8d9c7c@posting.google.co m...
> I have a worksheet that has a table of data.
> The table spans cells B2 - Q72
>
> I would like to place the same table of data underneath it but sorted
> by one of the colums in Ascending Order, then the same again
> underneath that but this time sorted in Descending order.
>
> eg:
>
> |
> |Table of Data
> |
> |
> |Table sorted in Ascending Order
> |
> |
> |Table sorted in Descending Order
> |
>
>
>
> so when data is changed in the top table the sort orders in the tables
> underneath are reflected as well.
>
> I would like this to happen automatically when data is entered and not
> by manually running a macro to update all the time?
>
> Is this possible?



 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
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
Results of radiation tests near MOD Hebrides range Anth General Military Discussions 0 03-02-2006 09:34
Conditional Formatting (How to format a range depending on another range) Josh Rogers Microsoft Applications 2 10-06-2005 18:00
Dynamic Range for non contiguous range prkhan56 Microsoft Applications 11 07-07-2005 08:00
selecting date range / data range autofilter hansiman Microsoft Applications 1 02-24-2005 00:00
copy results of advanced filter to a dynamic range - if only want certain records from the results - filter used to narrow down selection Cheryl Microsoft Applications 1 06-16-2004 03:07


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 11:22.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.61565 seconds with 19 queries