#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default Sort Columns


I have two columns of figures. My objective is to select the highest figure in
adjacent cells from the two columns and award points 25, 20, 15, 10, 5 to the top
five in the remaining column. What is the best way to tackle this? Example below.

Column A Column B
53 42
74 82
71 70
72 72
65 68
63 63
52 51
45 63

Best of both columns.
53
82
71
72
68
63
52
63

The above sorted.
82 25pts.
72 20
71 15
68 10
63 5
63
53
52

As one can see above where pts. equal 63 one could rely on the sort, award both 5
pts. or split the pts. between both (or more). I'm not too bothered about this
aspect though.



--

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Sort Columns

Hi Saxman,

A couple of stages.

First in column C extract the largest from the 2 columns with the formula

=MAX(A$1,B$1) drag this down for the length of you data.

Now make a table with your ranking and points

1 25
2 20
3 15
4 10
5 5

In my example it's in I1 to J5

Now in D1 enter the formula below and drag down and it will award the points.

=IF(ISERROR(VLOOKUP(RANK(C1,C$1:C$8),I$1:J$5,2,FAL SE)),"",VLOOKUP(RANK(C1,C$1:C$8),I$1:J$5,2,FALSE))


Mike

"Saxman" wrote:


I have two columns of figures. My objective is to select the highest figure in
adjacent cells from the two columns and award points 25, 20, 15, 10, 5 to the top
five in the remaining column. What is the best way to tackle this? Example below.

Column A Column B
53 42
74 82
71 70
72 72
65 68
63 63
52 51
45 63

Best of both columns.
53
82
71
72
68
63
52
63

The above sorted.
82 25pts.
72 20
71 15
68 10
63 5
63
53
52

As one can see above where pts. equal 63 one could rely on the sort, award both 5
pts. or split the pts. between both (or more). I'm not too bothered about this
aspect though.



--


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Sort Columns

Saxman,

I'm having an elderly moment, you can do it in 1 formula, not two.

Create your table and put this in c1 and drag down.

=IF(ISERROR(VLOOKUP(RANK(MAX(A1:B1),C$1:C$8),I$1:J $5,2,FALSE)),"",VLOOKUP(RANK(MAX(A1:B1),C$1:C$8),I $1:J$5,2,FALSE))

Mike

"Saxman" wrote:


I have two columns of figures. My objective is to select the highest figure in
adjacent cells from the two columns and award points 25, 20, 15, 10, 5 to the top
five in the remaining column. What is the best way to tackle this? Example below.

Column A Column B
53 42
74 82
71 70
72 72
65 68
63 63
52 51
45 63

Best of both columns.
53
82
71
72
68
63
52
63

The above sorted.
82 25pts.
72 20
71 15
68 10
63 5
63
53
52

As one can see above where pts. equal 63 one could rely on the sort, award both 5
pts. or split the pts. between both (or more). I'm not too bothered about this
aspect though.



--


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Sort Columns

Circular reference ????

"Mike H" wrote:

Saxman,

I'm having an elderly moment, you can do it in 1 formula, not two.

Create your table and put this in c1 and drag down.

=IF(ISERROR(VLOOKUP(RANK(MAX(A1:B1),C$1:C$8),I$1:J $5,2,FALSE)),"",VLOOKUP(RANK(MAX(A1:B1),C$1:C$8),I $1:J$5,2,FALSE))

Mike

"Saxman" wrote:


I have two columns of figures. My objective is to select the highest figure in
adjacent cells from the two columns and award points 25, 20, 15, 10, 5 to the top
five in the remaining column. What is the best way to tackle this? Example below.

Column A Column B
53 42
74 82
71 70
72 72
65 68
63 63
52 51
45 63

Best of both columns.
53
82
71
72
68
63
52
63

The above sorted.
82 25pts.
72 20
71 15
68 10
63 5
63
53
52

As one can see above where pts. equal 63 one could rely on the sort, award both 5
pts. or split the pts. between both (or more). I'm not too bothered about this
aspect though.



--


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Sort Columns

Well a bit ovalish""

Go back to the first option

Thanls Toppers.


Mike

"Toppers" wrote:

Circular reference ????

"Mike H" wrote:

Saxman,

I'm having an elderly moment, you can do it in 1 formula, not two.

Create your table and put this in c1 and drag down.

=IF(ISERROR(VLOOKUP(RANK(MAX(A1:B1),C$1:C$8),I$1:J $5,2,FALSE)),"",VLOOKUP(RANK(MAX(A1:B1),C$1:C$8),I $1:J$5,2,FALSE))

Mike

"Saxman" wrote:


I have two columns of figures. My objective is to select the highest figure in
adjacent cells from the two columns and award points 25, 20, 15, 10, 5 to the top
five in the remaining column. What is the best way to tackle this? Example below.

Column A Column B
53 42
74 82
71 70
72 72
65 68
63 63
52 51
45 63

Best of both columns.
53
82
71
72
68
63
52
63

The above sorted.
82 25pts.
72 20
71 15
68 10
63 5
63
53
52

As one can see above where pts. equal 63 one could rely on the sort, award both 5
pts. or split the pts. between both (or more). I'm not too bothered about this
aspect though.



--




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default Sort Columns

Mike H wrote:


I'm having an elderly moment, you can do it in 1 formula, not two.

Create your table and put this in c1 and drag down.

=IF(ISERROR(VLOOKUP(RANK(MAX(A1:B1),C$1:C$8),I$1:J $5,2,FALSE)),"",VLOOKUP(RANK(MAX(
A1:B1),C$1:C$8),I$1:J$5,2,FALSE))


Thanks Mike, but I get a circular reference if I paste in cell C1?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default Sort Columns

Mike H wrote:

A couple of stages.

First in column C extract the largest from the 2 columns with the formula

=MAX(A$1,B$1) drag this down for the length of you data.

Now make a table with your ranking and points

1 25
2 20
3 15
4 10
5 5

In my example it's in I1 to J5

Now in D1 enter the formula below and drag down and it will award the points.

=IF(ISERROR(VLOOKUP(RANK(C1,C$1:C$8),I$1:J$5,2,FAL SE)),"",VLOOKUP(RANK(C1,C$1:C$8),
I$1:J$5,2,FALSE))


This works fine.

--

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default Sort Columns

Don Guillett wrote:

try this.Copy down
=LARGE(a:b,ROW(A1))


This finds the best of both columns. I need to find the best between adjacent cells
first, then sort.

you may like this for the reward. copy down
=30-ROW(A1)*5


This works fine.




--

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Sort Columns

I think this array formula (entered with ctrl+shift+enter) will do it .
Change j to a and k to b.

=LARGE(IF($J$2:$J$6$K$2:$K$6,$J$2:$J$6,$K$2:$K$6) ,ROW(A1))

--
Don Guillett
SalesAid Software

"Saxman" wrote in message
...
Don Guillett wrote:

try this.Copy down
=LARGE(a:b,ROW(A1))


This finds the best of both columns. I need to find the best between
adjacent cells
first, then sort.

you may like this for the reward. copy down
=30-ROW(A1)*5


This works fine.




--




  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default Sort Columns

Don Guillett wrote:

I think this array formula (entered with ctrl+shift+enter) will do it .
Change j to a and k to b.

=LARGE(IF($J$2:$J$6$K$2:$K$6,$J$2:$J$6,$K$2:$K$6) ,ROW(A1))


=LARGE(IF($A$1:$A$8$B$1:$B$8,$A$1:$A$8,$B$1:$B$8) ,ROW(A1))

It doesn't appear to select the larger number from both columns.

53 42
74 82
71 70
72 72
65 68
63 63
52 51
45 63

The above give the following result below.

74
72
71
68
63
63
52
42

It should be.

82
72
71
68
63
63
53
52

--

  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sort Columns

Don's formula entered in C1 and copied down to C8 gives me the result you want.

82
72
71
68
63
63
53
52

Did you remember to CTRL + SHIFT + ENTER when placing the formula in C1?

If not, you'll get the results you did get.


Gord Dibben MS Excel MVP

On Sat, 16 Jun 2007 12:59:56 -0500, "Saxman"
wrote:

Don Guillett wrote:

I think this array formula (entered with ctrl+shift+enter) will do it .
Change j to a and k to b.

=LARGE(IF($J$2:$J$6$K$2:$K$6,$J$2:$J$6,$K$2:$K$6) ,ROW(A1))


=LARGE(IF($A$1:$A$8$B$1:$B$8,$A$1:$A$8,$B$1:$B$8 ),ROW(A1))

It doesn't appear to select the larger number from both columns.

53 42
74 82
71 70
72 72
65 68
63 63
52 51
45 63

The above give the following result below.

74
72
71
68
63
63
52
42

It should be.

82
72
71
68
63
63
53
52


  #14   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default Sort Columns

Don Guillett wrote:


Did you array enter as instructed?


I still get the same results.

Do I paste the formula in C1 and then CTRL + SHIFT + ENTER?


Maybe I'm doing something wrong?

--

  #15   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 111
Default Sort Columns

Don Guillett wrote:


Did you array enter as instructed?


I entered it manually, did as you said and all is fine now.

Thanks a million!

--



  #16   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Sort Columns


Glad to help
--
Don Guillett
SalesAid Software

"Saxman" wrote in message
...
Don Guillett wrote:


Did you array enter as instructed?


I entered it manually, did as you said and all is fine now.

Thanks a million!

--


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
Sort command does not sort some columns? BillyBob New Users to Excel 4 May 11th 06 04:16 PM
How do I sort the data in 8 columns by two of the columns? Sorting Excel Worksheet Functions 1 October 25th 05 03:57 PM
I need to sort 9 columns Doug P Excel Discussion (Misc queries) 2 October 20th 05 07:29 PM
data sort is not including all columns in sort Tracy Excel Discussion (Misc queries) 1 October 4th 05 12:16 AM
Sort Using Different Columns Jeremy Excel Discussion (Misc queries) 1 March 4th 05 11:07 PM


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