Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default RANK ABSOLUTE NUMBER AND WITHOUT GAP

The value that I need to rank include positive and negative number. I need
to treat them all absolute value and also need to rank without gap.

VALUE RANK RESULT
-15 6
14 5
13 4
-12 3
-10 2
9 1
-9 1

Any ideas?
--
M&M
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default RANK ABSOLUTE NUMBER AND WITHOUT GAP

Hi,

If you pull the absolute value out to another column

=ABS(A2)

and drag down then you can use this formula

=SUMPRODUCT(--(A2$A$2:$A$8),1/COUNTIF($A$2:$A$8,$A$2:$A$8&""))+1

I'm sure it can be done without a helper column but I can't see it for the
moment.

Mike

"M&M" wrote:

The value that I need to rank include positive and negative number. I need
to treat them all absolute value and also need to rank without gap.

VALUE RANK RESULT
-15 6
14 5
13 4
-12 3
-10 2
9 1
-9 1

Any ideas?
--
M&M

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default RANK ABSOLUTE NUMBER AND WITHOUT GAP

Yes, I understand I can do it with the formula Mike suggested but I am trying
to find a solution without a helper column.
--
M&M


"Mike H" wrote:

Hi,

If you pull the absolute value out to another column

=ABS(A2)

and drag down then you can use this formula

=SUMPRODUCT(--(A2$A$2:$A$8),1/COUNTIF($A$2:$A$8,$A$2:$A$8&""))+1

I'm sure it can be done without a helper column but I can't see it for the
moment.

Mike

"M&M" wrote:

The value that I need to rank include positive and negative number. I need
to treat them all absolute value and also need to rank without gap.

VALUE RANK RESULT
-15 6
14 5
13 4
-12 3
-10 2
9 1
-9 1

Any ideas?
--
M&M

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default RANK ABSOLUTE NUMBER AND WITHOUT GAP

M&M <Missie.lucky.com wrote...
Yes, I understand I can do it with the formula Mike suggested but I am trying
to find a solution without a helper column.

....
"M&M" wrote:

....
VALUE *RANK RESULT
-15 * 6
14 * *5
13 * *4
-12 * 3
-10 * 2
9 * * 1
-9 * *1

....

If the VALUE column is sorted in descending absolute value, then if
the result table had -15 in cell A2, try

B2 [array formula]:
=SUM(1/MMULT(--(ABS(A2:A8)=TRANSPOSE(ABS(A2:A8))),ROW(A2:A8)^0))

B3:
=D2-(ABS(A3)<ABS(A2))

Fill B3 down as far as needed.

If the VALUE column were unsorted, it gets trickier. Try

B2 [array formula]:
=SUM((ABS(A$2:A$8)<=ABS(A2))/(MMULT(--(ABS(A$2:A$8)=TRANSPOSE(ABS(A$2:A
$8))),
--(ABS(A$2:A$8)<=ABS(A2)))+(ABS(A$2:A$8)ABS(A2))))

Fill B2 down as far as needed.
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
Absolute $ for a number jeel Excel Worksheet Functions 9 January 31st 08 02:59 PM
Max absolute number Dan Excel Worksheet Functions 2 October 19th 07 03:19 PM
how do I 'shadow rank' a number into a field it isn't a part of Greg Quinn Excel Worksheet Functions 1 October 17th 06 02:20 PM
Rank Function and Number that are close together Peter Gundrum Milwaukee WI Excel Worksheet Functions 1 May 2nd 06 08:51 PM
How do I convert hh:mm:ss to an absolute number (26:01:32 to 26)? Fernando Excel Discussion (Misc queries) 1 December 1st 05 05:02 PM


All times are GMT +1. The time now is 07:09 AM.

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"