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 Function - Zero Value Ranked as 1 - Should be 10

Hi All - would appreciate your assistance! I am having a problem with how
the RANK function ranks ZERO values.

In the sample below, the VOLUME RANK for NAME2 is 1.0 - since the VOLUME
value is Zero (0), i would like it to read 10.
All the other RANKS are calculating correctly (in ascending order so low
numbers are given a high rank)

The formula in the VOLUME RANK (COL. D) field is:
=IF(B9="","",RANK(C9,$C$9:$C$18,1))

COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............25........................ 2
Line 10...Name2..............0......................... 1 (i want this rank
to read 10)
Line 11...Name3..............62.......................6
Line 12...Name4..............53.......................4
Line 13...Name5..............67.......................8
Line 14...Name6..............65.......................7
Line 15...Name7..............56.......................5
Line 16...Name8..............109...................10
Line 17...Name9..............96.......................9
Line 18...Name10............30.......................3

Thanks!
Sandi


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default RANK Function - Zero Value Ranked as 1 - Should be 10

Sandi,

=IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)-COUNTIF($C$9:$C$18,0),COUNTIF($C$9:$C$18,"<0")+CO UNTIF($C$9:C9,0)))

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message ...
Hi All - would appreciate your assistance! I am having a problem with how the RANK function ranks
ZERO values.

In the sample below, the VOLUME RANK for NAME2 is 1.0 - since the VOLUME value is Zero (0), i
would like it to read 10.
All the other RANKS are calculating correctly (in ascending order so low numbers are given a high
rank)

The formula in the VOLUME RANK (COL. D) field is: =IF(B9="","",RANK(C9,$C$9:$C$18,1))

COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............25........................ 2
Line 10...Name2..............0......................... 1 (i want this rank to read 10)
Line 11...Name3..............62.......................6
Line 12...Name4..............53.......................4
Line 13...Name5..............67.......................8
Line 14...Name6..............65.......................7
Line 15...Name7..............56.......................5
Line 16...Name8..............109...................10
Line 17...Name9..............96.......................9
Line 18...Name10............30.......................3

Thanks!
Sandi



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default THANKS!: RANK Function - Zero Value Ranked as 1 - Should be 10

Bernie - thank u so much! it works!
I would love to understand more on how this works if you have a minute!
I'm lost after: IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)
Thanks again!
Sandi

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandi,

=IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)-COUNTIF($C$9:$C$18,0),COUNTIF($C$9:$C$18,"<0")+CO UNTIF($C$9:C9,0)))

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message
...
Hi All - would appreciate your assistance! I am having a problem with
how the RANK function ranks ZERO values.

In the sample below, the VOLUME RANK for NAME2 is 1.0 - since the VOLUME
value is Zero (0), i would like it to read 10.
All the other RANKS are calculating correctly (in ascending order so low
numbers are given a high rank)

The formula in the VOLUME RANK (COL. D) field is:
=IF(B9="","",RANK(C9,$C$9:$C$18,1))

COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............25........................ 2
Line 10...Name2..............0......................... 1 (i want this
rank to read 10)
Line 11...Name3..............62.......................6
Line 12...Name4..............53.......................4
Line 13...Name5..............67.......................8
Line 14...Name6..............65.......................7
Line 15...Name7..............56.......................5
Line 16...Name8..............109...................10
Line 17...Name9..............96.......................9
Line 18...Name10............30.......................3

Thanks!
Sandi





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default THANKS!: RANK Function - Zero Value Ranked as 1 - Should be 10

Sandi,

RANK doesn't ignore zeroes, so you need to reduce the RANK result by the number of zero values (thus
the first COUNTIF). Then to get the RANK for zero values, you can't use RANK at all, and need to
count the number of non-zero values, and add up any other zeroes in the list.

Of course, this would probably all fall apart if any of your values were negative....

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message ...
Bernie - thank u so much! it works!
I would love to understand more on how this works if you have a minute!
I'm lost after: IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)
Thanks again!
Sandi

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandi,

=IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)-COUNTIF($C$9:$C$18,0),COUNTIF($C$9:$C$18,"<0")+CO UNTIF($C$9:C9,0)))

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message ...
Hi All - would appreciate your assistance! I am having a problem with how the RANK function
ranks ZERO values.

In the sample below, the VOLUME RANK for NAME2 is 1.0 - since the VOLUME value is Zero (0), i
would like it to read 10.
All the other RANKS are calculating correctly (in ascending order so low numbers are given a
high rank)

The formula in the VOLUME RANK (COL. D) field is: =IF(B9="","",RANK(C9,$C$9:$C$18,1))

COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............25........................ 2
Line 10...Name2..............0......................... 1 (i want this rank to read 10)
Line 11...Name3..............62.......................6
Line 12...Name4..............53.......................4
Line 13...Name5..............67.......................8
Line 14...Name6..............65.......................7
Line 15...Name7..............56.......................5
Line 16...Name8..............109...................10
Line 17...Name9..............96.......................9
Line 18...Name10............30.......................3

Thanks!
Sandi







  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default THANKS!: RANK Function - Zero Value Ranked as 1 - Should be 10

ahhh...i see!...it tested negative values and it seems to work
fine...however things go wonky when there are less then 10 records. RANK
still shows 10, even if there are less than 10 records.

eg.
COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............45........................ 2
Line 10...Name2..............0......................... 9 (this should show
5 or 4)
Line 11...Name3.............101......................3
Line 12...Name4..............20.......................1
Line 13...Name5..............0........................1 0 (this should show
5 or 4)

Sandi

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandi,

RANK doesn't ignore zeroes, so you need to reduce the RANK result by the
number of zero values (thus the first COUNTIF). Then to get the RANK for
zero values, you can't use RANK at all, and need to count the number of
non-zero values, and add up any other zeroes in the list.

Of course, this would probably all fall apart if any of your values were
negative....

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message
...
Bernie - thank u so much! it works!
I would love to understand more on how this works if you have a minute!
I'm lost after: IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)
Thanks again!
Sandi

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandi,

=IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)-COUNTIF($C$9:$C$18,0),COUNTIF($C$9:$C$18,"<0")+CO UNTIF($C$9:C9,0)))

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message
...
Hi All - would appreciate your assistance! I am having a problem with
how the RANK function ranks ZERO values.

In the sample below, the VOLUME RANK for NAME2 is 1.0 - since the
VOLUME value is Zero (0), i would like it to read 10.
All the other RANKS are calculating correctly (in ascending order so
low numbers are given a high rank)

The formula in the VOLUME RANK (COL. D) field is:
=IF(B9="","",RANK(C9,$C$9:$C$18,1))

COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............25........................ 2
Line 10...Name2..............0......................... 1 (i want this
rank to read 10)
Line 11...Name3..............62.......................6
Line 12...Name4..............53.......................4
Line 13...Name5..............67.......................8
Line 14...Name6..............65.......................7
Line 15...Name7..............56.......................5
Line 16...Name8..............109...................10
Line 17...Name9..............96.......................9
Line 18...Name10............30.......................3

Thanks!
Sandi











  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default THANKS!: RANK Function - Zero Value Ranked as 1 - Should be 10

This seems to do what you want: (not tested on negative numbers)

=IF(C9="","",IF(C9<0,SUMPRODUCT(--(C$9:C$13<0),--(C9C$9:C$13))+1,SUMPRODUCT(--(C$9:C$13<0),--(C9<C$9:C$13))+COUNTIF(C$9:C9,0)))

Biff

"Sandi" wrote in message
...
ahhh...i see!...it tested negative values and it seems to work
fine...however things go wonky when there are less then 10 records. RANK
still shows 10, even if there are less than 10 records.

eg.
COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............45........................ 2
Line 10...Name2..............0......................... 9 (this should
show 5 or 4)
Line 11...Name3.............101......................3
Line 12...Name4..............20.......................1
Line 13...Name5..............0........................1 0 (this should show
5 or 4)

Sandi

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandi,

RANK doesn't ignore zeroes, so you need to reduce the RANK result by the
number of zero values (thus the first COUNTIF). Then to get the RANK for
zero values, you can't use RANK at all, and need to count the number of
non-zero values, and add up any other zeroes in the list.

Of course, this would probably all fall apart if any of your values were
negative....

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message
...
Bernie - thank u so much! it works!
I would love to understand more on how this works if you have a minute!
I'm lost after: IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)
Thanks again!
Sandi

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandi,

=IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)-COUNTIF($C$9:$C$18,0),COUNTIF($C$9:$C$18,"<0")+CO UNTIF($C$9:C9,0)))

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message
...
Hi All - would appreciate your assistance! I am having a problem with
how the RANK function ranks ZERO values.

In the sample below, the VOLUME RANK for NAME2 is 1.0 - since the
VOLUME value is Zero (0), i would like it to read 10.
All the other RANKS are calculating correctly (in ascending order so
low numbers are given a high rank)

The formula in the VOLUME RANK (COL. D) field is:
=IF(B9="","",RANK(C9,$C$9:$C$18,1))

COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............25........................ 2
Line 10...Name2..............0......................... 1 (i want this
rank to read 10)
Line 11...Name3..............62.......................6
Line 12...Name4..............53.......................4
Line 13...Name5..............67.......................8
Line 14...Name6..............65.......................7
Line 15...Name7..............56.......................5
Line 16...Name8..............109...................10
Line 17...Name9..............96.......................9
Line 18...Name10............30.......................3

Thanks!
Sandi











  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default RANK Function - Zero Value Ranked as 1 - Should be 10

Try...

D9, copied down:

=IF(C90,SUMPRODUCT(--($C$9:$C$180),--(C9$C$9:$C$18))+1,(COUNTIF($C$9:$
C$18,""&C9)+1))

Hope this helps!

In article ,
"Sandi" wrote:

Hi All - would appreciate your assistance! I am having a problem with how
the RANK function ranks ZERO values.

In the sample below, the VOLUME RANK for NAME2 is 1.0 - since the VOLUME
value is Zero (0), i would like it to read 10.
All the other RANKS are calculating correctly (in ascending order so low
numbers are given a high rank)

The formula in the VOLUME RANK (COL. D) field is:
=IF(B9="","",RANK(C9,$C$9:$C$18,1))

COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............25........................ 2
Line 10...Name2..............0......................... 1 (i want this rank
to read 10)
Line 11...Name3..............62.......................6
Line 12...Name4..............53.......................4
Line 13...Name5..............67.......................8
Line 14...Name6..............65.......................7
Line 15...Name7..............56.......................5
Line 16...Name8..............109...................10
Line 17...Name9..............96.......................9
Line 18...Name10............30.......................3

Thanks!
Sandi

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default THANKS BIFF!: RANK Function - Zero Value Ranked as 1 - Should be 10

Hi Biff ... well, seems to work! i appreciate your time! if you have a
moment, i would really like to break down this formula so i can understand
it.
Sandi


"Biff" wrote in message
...
This seems to do what you want: (not tested on negative numbers)

=IF(C9="","",IF(C9<0,SUMPRODUCT(--(C$9:C$13<0),--(C9C$9:C$13))+1,SUMPRODUCT(--(C$9:C$13<0),--(C9<C$9:C$13))+COUNTIF(C$9:C9,0)))

Biff

"Sandi" wrote in message
...
ahhh...i see!...it tested negative values and it seems to work
fine...however things go wonky when there are less then 10 records. RANK
still shows 10, even if there are less than 10 records.

eg.
COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............45........................ 2
Line 10...Name2..............0......................... 9 (this should
show 5 or 4)
Line 11...Name3.............101......................3
Line 12...Name4..............20.......................1
Line 13...Name5..............0........................1 0 (this should
show 5 or 4)

Sandi

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandi,

RANK doesn't ignore zeroes, so you need to reduce the RANK result by the
number of zero values (thus the first COUNTIF). Then to get the RANK
for zero values, you can't use RANK at all, and need to count the number
of non-zero values, and add up any other zeroes in the list.

Of course, this would probably all fall apart if any of your values were
negative....

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message
...
Bernie - thank u so much! it works!
I would love to understand more on how this works if you have a minute!
I'm lost after: IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)
Thanks again!
Sandi

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandi,

=IF(B9="","",IF(C9<0,RANK(C9,$C$9:$C$18,TRUE)-COUNTIF($C$9:$C$18,0),COUNTIF($C$9:$C$18,"<0")+CO UNTIF($C$9:C9,0)))

HTH,
Bernie
MS Excel MVP


"Sandi" wrote in message
...
Hi All - would appreciate your assistance! I am having a problem
with how the RANK function ranks ZERO values.

In the sample below, the VOLUME RANK for NAME2 is 1.0 - since the
VOLUME value is Zero (0), i would like it to read 10.
All the other RANKS are calculating correctly (in ascending order so
low numbers are given a high rank)

The formula in the VOLUME RANK (COL. D) field is:
=IF(B9="","",RANK(C9,$C$9:$C$18,1))

COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............25........................ 2
Line 10...Name2..............0......................... 1 (i want
this rank to read 10)
Line 11...Name3..............62.......................6
Line 12...Name4..............53.......................4
Line 13...Name5..............67.......................8
Line 14...Name6..............65.......................7
Line 15...Name7..............56.......................5
Line 16...Name8..............109...................10
Line 17...Name9..............96.......................9
Line 18...Name10............30.......................3

Thanks!
Sandi













  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Thanks Domenic! RANK Function - Zero Value Ranked as 1 - Should be 10

Thanks Domenic! Appreciate your time!
Sandi

"Domenic" wrote in message
...
Try...

D9, copied down:

=IF(C90,SUMPRODUCT(--($C$9:$C$180),--(C9$C$9:$C$18))+1,(COUNTIF($C$9:$
C$18,""&C9)+1))

Hope this helps!

In article ,
"Sandi" wrote:

Hi All - would appreciate your assistance! I am having a problem with
how
the RANK function ranks ZERO values.

In the sample below, the VOLUME RANK for NAME2 is 1.0 - since the VOLUME
value is Zero (0), i would like it to read 10.
All the other RANKS are calculating correctly (in ascending order so low
numbers are given a high rank)

The formula in the VOLUME RANK (COL. D) field is:
=IF(B9="","",RANK(C9,$C$9:$C$18,1))

COL B...........COL C................COL D
Line 8....NAME...........Volume..............Volume Rank
Line 9....Name1..............25........................ 2
Line 10...Name2..............0......................... 1 (i want this
rank
to read 10)
Line 11...Name3..............62.......................6
Line 12...Name4..............53.......................4
Line 13...Name5..............67.......................8
Line 14...Name6..............65.......................7
Line 15...Name7..............56.......................5
Line 16...Name8..............109...................10
Line 17...Name9..............96.......................9
Line 18...Name10............30.......................3

Thanks!
Sandi



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
Rank Function Jeana Excel Discussion (Misc queries) 4 June 27th 06 10:58 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
How can I use Excel to solve an equation? titina Excel Worksheet Functions 4 April 11th 06 11:19 PM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


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