• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 411
  • Last Modified:

Ranking

Can someone help with ranking the data in C based on condition in column A.  I want to rank column C if value in column A is greater than 500  otherwise i want to show blank in the ranking field..Here is my sample data

A      	B      	 C
37     	$2,174 	 $58.76 
441   	$23,930  $54.26 
778   	$41,684  $53.58 
20     	$1,339 	 $66.95 
303   	$8,842 	 $29.18 
1095 	$30,058  $27.45 
178   	$11,720  $65.84 
167   	$8,955 	 $53.62 
1161 	$35,335  $30.44 
5       $302 	 $60.44 
3       $177 	 $59.13 
47     	$947 	 $20.15 

Open in new window

0
fb1990
Asked:
fb1990
  • 9
  • 8
  • 2
  • +1
2 Solutions
 
SiddharthRoutCommented:
I am not sure I understand you. How should the output look like? Is "Ranking" the Fourth column? Can you show in an excel file how the output should look like based on the above data?

Sid
0
 
jimyXCommented:
You did not say what kind of rankin, is just to copy column C to the Ranking column if A is greater than 500?
You can put this formula in column Ranking:
=IF(ISNUMBER(A1),IF(A1>500,C1,""),"Not a number")
0
 
fb1990Author Commented:
I am attaching a sample spreadsheet.  The result will be in column d
sample-rank.xlsx
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
SiddharthRoutCommented:
You showed rank as 1 for

334      $50,100       $150.00       1

But the value is less than 500?

Sid
0
 
fb1990Author Commented:
yes...this is problem.. i only want to rank C if the value in A is greater than 500
0
 
SiddharthRoutCommented:
ok got it. Give me few moments

Sid
0
 
SiddharthRoutCommented:
Quick question: Is it ok if I sort the data or do you want to keep the original position intact?

Sid
0
 
fb1990Author Commented:
i want to keep the original position intack.  I have other fields that i need to apply the same logic and then use use the new column in an index/match formula( more like look up value if the value in my column D is 1,2,3,4...10.  I am actually trying to get the top based on the condition highlighted above
0
 
fb1990Author Commented:
sorry....i am trying to get the top 10
0
 
SiddharthRoutCommented:
Ok. Last question. Could there be duplicate values in Col A?

Sid
0
 
fb1990Author Commented:
yes
0
 
SiddharthRoutCommented:
Like this?

Sid
Ranking.xls
0
 
fb1990Author Commented:
It worked, but is there a way to do the samething by using excel formula?  I need to apply the logic to other fields in my spreadsheet
0
 
SiddharthRoutCommented:
I am not sure if it can be done using an Excel Formula. Only Barry [ Formula King :) ] would be able to confirm.

Sid
0
 
fb1990Author Commented:
How can get him to look at the request?
0
 
dlmilleCommented:
Just paste this in column D, cell 2 and drag down and you're good for the next 1000 rows

See attached.

Enjoy!

Dave
ranking-r1.xlsx
0
 
dlmilleCommented:
Here's the formula -

=IF(A2>500,SUMPRODUCT(--(C2>$C$2:$C$1000)*($C$2:$C$1000<>"")*($A$2:$A$1000> 500))+1,"")


Dave
0
 
SiddharthRoutCommented:
Good One Dave :)

Sid
0
 
fb1990Author Commented:
Thank you Sid...I am awarding some of the point to you for your effort.  Dave solution worked like a charm
0
 
SiddharthRoutCommented:
You are very kind :)

Thanks again.

Sid
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 9
  • 8
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now