Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Henrik
 
Posts: n/a
Default Rank() based on category

Is it possible to rank a value within its respective category? For instance,
if I have a dataset that is structured similar to the one below, I want to a
formula that returns each oberservation's rank within its respective category.

1 a
4 a
5 a
6 b
7 b
7 b
7 a
3 a


The first observation would be ranked 1 within category a
The fourth observation would be ranked 1 within category b
The last oberservation would be ranked 2 within category a
and so forth....

I think that I somehow need to use an array function (ctrl + shift + enter),
but I haven't had any success using rank() submitted as an array!

Hope my question makes sense. Thank, in advance, for your help!
  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=SUMPRODUCT(--($B$2:$B$9=B2),--($A$2:$A$9<A2))+1

where A2:A9 houses the sample figures and B2:B9 categories.

Henrik wrote:
Is it possible to rank a value within its respective category? For instance,
if I have a dataset that is structured similar to the one below, I want to a
formula that returns each oberservation's rank within its respective category.

1 a
4 a
5 a
6 b
7 b
7 b
7 a
3 a


The first observation would be ranked 1 within category a
The fourth observation would be ranked 1 within category b
The last oberservation would be ranked 2 within category a
and so forth....

I think that I somehow need to use an array function (ctrl + shift + enter),
but I haven't had any success using rank() submitted as an array!

Hope my question makes sense. Thank, in advance, for your help!

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
Excel problem with web based spreadsheets Steve Williams Excel Discussion (Misc queries) 0 January 12th 05 02:11 PM
Tie breaking in a rank order HondaMike Excel Worksheet Functions 1 December 29th 04 11:30 PM
Selecting data from a list based on entered values GrantM Excel Discussion (Misc queries) 1 December 20th 04 10:59 AM
formula based on format James Kendall Excel Discussion (Misc queries) 4 December 16th 04 04:47 PM
Rank Function carl Excel Worksheet Functions 2 November 15th 04 07:23 PM


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