Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Unique Rank function not working

Can anyone figure out why this formula would not be working (all cell
formatting is in tact):

RANK(G6,G$6:G$130)+COUNTIF(G$6:G6, G6)-1

Thanks in advance,

BK

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Unique Rank function not working

Hi,

What do you want it to do?

The first part
=RANK(G6,G$6:G$130)
will rank G6 in the range G6 - G30 and works fine. If you drag it down it
will rank G7 etc.

The second part is confusing
+COUNTIF(G$6:G6, G6)-1
As displayed it wil count how often the value in G6 appears in the range
G6-G6 and subtract 1 so it will always evaluate as zero.
If you drag it down it becomes
+COUNTIF(G$6:G7, G7)-1
at this point it is evaluating a 2 cell range for whatever is in G7
What do you want it to do?

Mike

" wrote:

Can anyone figure out why this formula would not be working (all cell
formatting is in tact):

RANK(G6,G$6:G$130)+COUNTIF(G$6:G6, G6)-1

Thanks in advance,

BK


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Unique Rank function not working

Mike, the COUNTIF bit at the end will give rise to unique ranks where
duplicates occur in the range - instead of getting, say, three ranks
of 5 and then the next rank of 8 if there are three equal values, this
will add 0 for the first occurrence, 1 for the second occurrence and 2
for the 3rd occurrence, turning the ranks into 5, 6 and 7
respectively.

Pete

On Sep 19, 2:30 pm, Mike H wrote:
Hi,

What do you want it to do?

The first part
=RANK(G6,G$6:G$130)
will rank G6 in the range G6 - G30 and works fine. If you drag it down it
will rank G7 etc.

The second part is confusing
+COUNTIF(G$6:G6, G6)-1
As displayed it wil count how often the value in G6 appears in the range
G6-G6 and subtract 1 so it will always evaluate as zero.
If you drag it down it becomes
+COUNTIF(G$6:G7, G7)-1
at this point it is evaluating a 2 cell range for whatever is in G7
What do you want it to do?

Mike



" wrote:
Can anyone figure out why this formula would not be working (all cell
formatting is in tact):


RANK(G6,G$6:G$130)+COUNTIF(G$6:G6, G6)-1


Thanks in advance,


BK- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Unique Rank function not working

What does "would not be working" mean? Nothing returned? Error value? or
what?

Is G$6:G$130 sorted in assending order?

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


wrote in message
oups.com...
Can anyone figure out why this formula would not be working (all cell
formatting is in tact):

RANK(G6,G$6:G$130)+COUNTIF(G$6:G6, G6)-1

Thanks in advance,

BK




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
Default Unique Rank function not working

Hello,

Are you using text values?

Anyway, I would always use
=COUNTIF(G$6:G$130,""&G6)+COUNTIF(G$6:G6,G6)
and copy down.

Works both for numbers and for text.

Regards,
Bernd



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Unique Rank function not working

On Sep 19, 11:54 am, Bernd P wrote:
Hello,

Are you using text values?

Anyway, I would always use
=COUNTIF(G$6:G$130,""&G6)+COUNTIF(G$6:G6,G6)
and copy down.

Works both for numbers and for text.

Regards,
Bernd


Thanks for the responses...Just trying to get unique ranks (i.e. no
ties) for these numbers. The formula in my intitial post is supposed
to do the trick but I am still getting ties...

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
Default Unique Rank function not working

Hello again,

There might be *a* text value in your data.

Does it work with my approach?

Regards,
Bernd

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
Default Unique Rank function not working

Hello Sandy,

Maybe I misunderstood you.

My formula ensures that there will be no ties at all. If values are
identical the first occurances gets the highest rank.

If you do want ties then omit the second countif.

Regards,
Bernd

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Unique Rank function not working

Hi Bernd,

My comments were actually intended for the OP but looking at how I posted I
see how it was misleading. The OP posted:

RANK(G6,G$6:G$130)+COUNTIF(G$6:G6, G6)-1

and said in another post:

"Just trying to get unique ranks (i.e. no
ties) for these numbers. The formula in my intitial post is supposed
to do the trick but I am still getting ties..."

Thus I posted that I did not get any ties.


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Bernd P" wrote in message
oups.com...
Hello Sandy,

Maybe I misunderstood you.

My formula ensures that there will be no ties at all. If values are
identical the first occurances gets the highest rank.

If you do want ties then omit the second countif.

Regards,
Bernd






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 yshridhar Excel Worksheet Functions 9 August 27th 07 09:10 AM
Rank Function azlan Setting up and Configuration of Excel 1 July 10th 07 09:14 AM
Unique Records Only is not working.... Bruce Excel Worksheet Functions 1 December 2nd 06 06:53 PM
Rank Function Jeff Excel Discussion (Misc queries) 1 November 8th 05 08:26 PM
Rank Function carl Excel Worksheet Functions 2 November 15th 04 07:23 PM


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