Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default An instant sorting problem

Dear all,

I have a list of data in 2 columns: Column A stores 1000 names of
students and Column B stores the scores of the corresponding students. If I
want to make a sorted list of data in Columns C and D with descending
scores, what formulas should I use in columns C and D? It should be noted
that some students may get the same score. The order of these students in
the sorted list is not important as long as they are in adjacent rows.

Best Regards,
Chris


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default An instant sorting problem

If you want to do this with standard functions (no VBA) it is possible if you
use a few intermediate columns(which you could hide or move to another sheet,
if you need to).

With your data in columns A and B, here would be formulas for columns C, D
and E (the intermediate calculations) and F and G with the results. Use
these formulas in the first row and copy them down:

C1: This gives the rank of the student's score
=RANK(B1,B:B,0)
D1: This accounts for possible 'ties' in rank
=C1+COUNTIF($C$1:C1,C1)-1
E1: This finds the row number for the student whose rank matches the current
row number
=MATCH(ROW(D1),D:D,0)
F1: This looks up the student from the row found in column E
=OFFSET($A$1,E1-1,0)
G1: This looks up the corresponding score
=OFFSET($A$1,E1-1,1)

K Dales

"Chris" wrote:

Dear all,

I have a list of data in 2 columns: Column A stores 1000 names of
students and Column B stores the scores of the corresponding students. If I
want to make a sorted list of data in Columns C and D with descending
scores, what formulas should I use in columns C and D? It should be noted
that some students may get the same score. The order of these students in
the sorted list is not important as long as they are in adjacent rows.

Best Regards,
Chris



  #3   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default An instant sorting problem

Wouldn't it be easier to select both columns and do a normal descending order
sort by column "B"? This will sort the existing list exactly how you want!

"Chris" wrote:

Dear all,

I have a list of data in 2 columns: Column A stores 1000 names of
students and Column B stores the scores of the corresponding students. If I
want to make a sorted list of data in Columns C and D with descending
scores, what formulas should I use in columns C and D? It should be noted
that some students may get the same score. The order of these students in
the sorted list is not important as long as they are in adjacent rows.

Best Regards,
Chris



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
live instant updaate hprab50 Excel Worksheet Functions 1 September 13th 07 08:06 PM
Add Instant Totals use what feature? bluemoon Excel Worksheet Functions 3 August 6th 06 12:19 AM
Hyperlinks Not Instant In 2007 ?? Nick Hodge New Users to Excel 2 July 18th 06 12:33 AM
An instant sorting problem Chris Excel Worksheet Functions 1 November 4th 04 07:31 PM
Instant messaging Lawlera Excel Programming 0 November 21st 03 10:16 AM


All times are GMT +1. The time now is 04:36 PM.

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

About Us

"It's about Microsoft Excel"