Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Ordering a list of numbers?

I have a list of numbers in 9 adjacent cells. The numbers in them are unique
1-9 but in random order. I need to select a consecutive range of 7 of these
cells and find out the order of the nunbers in the cells. When I find out
the lowest number in the range, I need to assign a 1 to a corresponding cell.
When I find the next lowest number in the range, I need to asign a 2 to the
corresponding cell, etc. Until I have a new 7-cell range that contains 1-7
(unique, but random).

For instance, here are the numbers in the 9 cells:
8,5,9,2,4,7,1,6,3

If the range I choose is the first 7 cells, then the cells corresponding to
the first 7 cells in the list would be:
6,5,7,2,3,6,1

Any ideas. I'm open to writing a function if necessary.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Ordering a list of numbers?

I think you can use the RANK function to do this.


"fedude" wrote in message
...
I have a list of numbers in 9 adjacent cells. The numbers in
them are unique
1-9 but in random order. I need to select a consecutive range
of 7 of these
cells and find out the order of the nunbers in the cells. When
I find out
the lowest number in the range, I need to assign a 1 to a
corresponding cell.
When I find the next lowest number in the range, I need to
asign a 2 to the
corresponding cell, etc. Until I have a new 7-cell range that
contains 1-7
(unique, but random).

For instance, here are the numbers in the 9 cells:
8,5,9,2,4,7,1,6,3

If the range I choose is the first 7 cells, then the cells
corresponding to
the first 7 cells in the list would be:
6,5,7,2,3,6,1

Any ideas. I'm open to writing a function if necessary.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Ordering a list of numbers?


PERFECT! Thanks Chip



"Chip Pearson" wrote:

I think you can use the RANK function to do this.


"fedude" wrote in message
...
I have a list of numbers in 9 adjacent cells. The numbers in
them are unique
1-9 but in random order. I need to select a consecutive range
of 7 of these
cells and find out the order of the nunbers in the cells. When
I find out
the lowest number in the range, I need to assign a 1 to a
corresponding cell.
When I find the next lowest number in the range, I need to
asign a 2 to the
corresponding cell, etc. Until I have a new 7-cell range that
contains 1-7
(unique, but random).

For instance, here are the numbers in the 9 cells:
8,5,9,2,4,7,1,6,3

If the range I choose is the first 7 cells, then the cells
corresponding to
the first 7 cells in the list would be:
6,5,7,2,3,6,1

Any ideas. I'm open to writing a function if necessary.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Ordering a list of numbers?

Look up the rank function in Help. I think you should be able to make that
work...
--
HTH...

Jim Thomlinson


"fedude" wrote:

I have a list of numbers in 9 adjacent cells. The numbers in them are unique
1-9 but in random order. I need to select a consecutive range of 7 of these
cells and find out the order of the nunbers in the cells. When I find out
the lowest number in the range, I need to assign a 1 to a corresponding cell.
When I find the next lowest number in the range, I need to asign a 2 to the
corresponding cell, etc. Until I have a new 7-cell range that contains 1-7
(unique, but random).

For instance, here are the numbers in the 9 cells:
8,5,9,2,4,7,1,6,3

If the range I choose is the first 7 cells, then the cells corresponding to
the first 7 cells in the list would be:
6,5,7,2,3,6,1

Any ideas. I'm open to writing a function if necessary.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Ordering a list of numbers?


It's like the RANK function was developed for my need...

PERFECT! Thanks Jim


"Jim Thomlinson" wrote:

Look up the rank function in Help. I think you should be able to make that
work...
--
HTH...

Jim Thomlinson


"fedude" wrote:

I have a list of numbers in 9 adjacent cells. The numbers in them are unique
1-9 but in random order. I need to select a consecutive range of 7 of these
cells and find out the order of the nunbers in the cells. When I find out
the lowest number in the range, I need to assign a 1 to a corresponding cell.
When I find the next lowest number in the range, I need to asign a 2 to the
corresponding cell, etc. Until I have a new 7-cell range that contains 1-7
(unique, but random).

For instance, here are the numbers in the 9 cells:
8,5,9,2,4,7,1,6,3

If the range I choose is the first 7 cells, then the cells corresponding to
the first 7 cells in the list would be:
6,5,7,2,3,6,1

Any ideas. I'm open to writing a function if necessary.



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
random ordering a list in excel zhen Excel Worksheet Functions 4 January 28th 09 03:34 PM
change a vertical list of numbers to horizontal list from 1 cell caz Excel Discussion (Misc queries) 3 September 27th 06 12:11 PM
how to extract unique numbers once from a list of repeated numbers? [email protected] Excel Discussion (Misc queries) 2 May 2nd 06 04:17 PM
re-ordering the list on a filter drop down Kylor Excel Discussion (Misc queries) 3 December 19th 05 06:59 PM
ordering Dave B[_3_] Excel Programming 2 August 14th 04 03:52 AM


All times are GMT +1. The time now is 11:38 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"